Skip to content

Commit 3caa884

Browse files
add hot tier details in banner and about api response (#910)
1 parent 6095922 commit 3caa884

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

server/src/banner.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,14 @@ async fn storage_info(config: &Config) {
123123
size
124124
);
125125
}
126+
if let Some(path) = &config.parseable.hot_tier_storage_path {
127+
eprintln!(
128+
"\
129+
{:8}Hot Tier: \"Enabled, Path: {}\"",
130+
"",
131+
path.display(),
132+
);
133+
}
126134

127135
eprintln!(
128136
"\

server/src/handlers/http/about.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,16 @@ pub async fn about() -> Json<serde_json::Value> {
9494
)
9595
};
9696

97+
let hot_tier_details: String = if CONFIG.hot_tier_dir().is_none() {
98+
"Disabled".to_string()
99+
} else {
100+
let hot_tier_dir: &Option<PathBuf> = CONFIG.hot_tier_dir();
101+
format!(
102+
"Enabled, Path: {}",
103+
hot_tier_dir.as_ref().unwrap().display(),
104+
)
105+
};
106+
97107
let ms_clarity_tag = &CONFIG.parseable.ms_clarity_tag;
98108

99109
Json(json!({
@@ -110,6 +120,7 @@ pub async fn about() -> Json<serde_json::Value> {
110120
"mode": mode,
111121
"staging": staging,
112122
"cache": cache_details,
123+
"hotTier": hot_tier_details,
113124
"grpcPort": grpc_port,
114125
"store": {
115126
"type": CONFIG.get_storage_mode_string(),

server/src/option.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,10 @@ Cloud Native, log analytics platform for modern applications."#,
159159
&self.parseable.local_cache_path
160160
}
161161

162+
pub fn hot_tier_dir(&self) -> &Option<PathBuf> {
163+
&self.parseable.hot_tier_storage_path
164+
}
165+
162166
pub fn is_default_creds(&self) -> bool {
163167
self.parseable.username == Cli::DEFAULT_USERNAME
164168
&& self.parseable.password == Cli::DEFAULT_PASSWORD

0 commit comments

Comments
 (0)