Page MenuHomePhabricator

D11162.diff
No OneTemporary

D11162.diff

diff --git a/services/identity/src/constants.rs b/services/identity/src/constants.rs
--- a/services/identity/src/constants.rs
+++ b/services/identity/src/constants.rs
@@ -169,6 +169,8 @@
pub const DEFAULT_OPENSEARCH_ENDPOINT: &str =
"identity-search-domain.us-east-2.opensearch.localhost.local
stack.cloud:4566";
+pub const IDENTITY_SEARCH_INDEX: &str = "users";
+pub const IDENTITY_SEARCH_RESULT_SIZE: u32 = 20;
// Tunnelbroker
pub const TUNNELBROKER_GRPC_ENDPOINT: &str = "TUNNELBROKER_GRPC_ENDPOINT";
diff --git a/services/identity/src/websockets/mod.rs b/services/identity/src/websockets/mod.rs
--- a/services/identity/src/websockets/mod.rs
+++ b/services/identity/src/websockets/mod.rs
@@ -23,6 +23,7 @@
use crate::config::CONFIG;
use crate::constants::{
+ IDENTITY_SEARCH_INDEX, IDENTITY_SEARCH_RESULT_SIZE,
IDENTITY_SERVICE_WEBSOCKET_ADDR, SOCKET_HEARTBEAT_TIMEOUT,
};
use send::{send_message, WebsocketSink};
@@ -30,6 +31,7 @@
#[derive(Serialize, Deserialize)]
struct Query {
+ size: u32,
query: Prefix,
}
@@ -147,6 +149,7 @@
prefix_request: identity_search_messages::IdentitySearchPrefix,
) -> Result<IdentitySearchResult, errors::WebsocketError> {
let prefix_query = Query {
+ size: IDENTITY_SEARCH_RESULT_SIZE,
query: Prefix {
prefix: Username {
username: prefix_request.prefix.trim().to_string(),

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 1, 11:48 AM (18 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2604934
Default Alt Text
D11162.diff (1 KB)

Event Timeline