fix(rpc): bind internode auth to exact targets (#4988)

This commit is contained in:
cxymds
2026-07-19 21:52:57 +08:00
committed by GitHub
parent b0c6c4cbce
commit 133499c2d5
11 changed files with 821 additions and 34 deletions
+9
View File
@@ -54,6 +54,15 @@ pub async fn get_global_local_node_name() -> String {
GLOBAL_LOCAL_NODE_NAME.read().await.clone()
}
/// Read the local node name without waiting for initialization or a writer.
pub fn try_get_global_local_node_name() -> Option<String> {
GLOBAL_LOCAL_NODE_NAME
.try_read()
.ok()
.map(|name| name.clone())
.filter(|name| !name.is_empty())
}
/// Set the global RustFS initialization time to the current UTC time.
pub async fn set_global_init_time_now() {
let now = Utc::now();