refactor(rpc): use node name accessor in health handlers (#1972)

This commit is contained in:
安正超
2026-02-26 19:37:16 +08:00
committed by GitHub
parent 40903ec2af
commit dafb31d208
3 changed files with 15 additions and 7 deletions
+8
View File
@@ -38,6 +38,14 @@ pub async fn set_global_local_node_name(name: &str) {
*GLOBAL_LOCAL_NODE_NAME.write().await = name.to_string();
}
/// Get the global local node name.
///
/// # Returns
/// * `String` - The local node name.
pub async fn get_global_local_node_name() -> String {
GLOBAL_LOCAL_NODE_NAME.read().await.clone()
}
/// Set the global RustFS initialization time to the current UTC time.
pub async fn set_global_init_time_now() {
let now = Utc::now();