Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions server/src/handlers/http/modal/ingest_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,9 @@ impl IngestServer {
store.get_bucket_name(),
&CONFIG.parseable.username,
&CONFIG.parseable.password,
CONFIG.staging_dir().display().to_string(),
CONFIG.get_storage_mode_string(),
CONFIG.storage().get_endpoint()
);

let resource = serde_json::to_string(&resource)
Expand Down
15 changes: 15 additions & 0 deletions server/src/handlers/http/modal/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ pub struct IngesterMetadata {
pub domain_name: String,
pub bucket_name: String,
pub token: String,
pub staging_dir: String,
pub storage_mode: String,
pub storage_path: String,
}

impl IngesterMetadata {
Expand All @@ -71,6 +74,9 @@ impl IngesterMetadata {
bucket_name: String,
username: &str,
password: &str,
staging_dir: String,
storage_mode: &str,
storage_path: String,
) -> Self {
let token = base64::prelude::BASE64_STANDARD.encode(format!("{}:{}", username, password));

Expand All @@ -82,6 +88,9 @@ impl IngesterMetadata {
version,
bucket_name,
token,
staging_dir,
storage_mode: storage_mode.to_string(),
storage_path,
}
}
}
Expand All @@ -102,6 +111,9 @@ mod test {
"somebucket".to_string(),
"admin",
"admin",
"staging_dir".to_string(),
"storage_mode",
"storage_path".to_string(),
);

let rhs = serde_json::from_slice::<IngesterMetadata>(br#"{"version":"v3","port":"8000","domain_name":"https://localhost:8000","bucket_name":"somebucket","token":"Basic YWRtaW46YWRtaW4="}"#).unwrap();
Expand All @@ -118,6 +130,9 @@ mod test {
"somebucket".to_string(),
"admin",
"admin",
"staging_dir".to_string(),
"storage_mode",
"storage_path".to_string()
);

let lhs = serde_json::to_string(&im)
Expand Down
12 changes: 12 additions & 0 deletions server/src/handlers/http/modal/query_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@ impl QueryServer {
reqw.is_ok(),
reqw.as_ref().err().map(|e| e.to_string()),
reqw.ok().map(|r| r.status().to_string()),
ingester.staging_dir,
ingester.storage_mode,
ingester.storage_path,
));
}

Expand Down Expand Up @@ -666,6 +669,9 @@ struct ClusterInfo {
reachable: bool,
error: Option<String>, // error message if the ingester is not reachable
status: Option<String>, // status message if the ingester is reachable
staging_dir: String,
storage_mode: String,
storage_path: String
}

impl ClusterInfo {
Expand All @@ -674,12 +680,18 @@ impl ClusterInfo {
reachable: bool,
error: Option<String>,
status: Option<String>,
staging_dir: String,
storage_mode: String,
storage_path: String
) -> Self {
Self {
domain_name: domain_name.to_string(),
reachable,
error,
status,
staging_dir,
storage_mode,
storage_path
}
}
}