1use std::collections::HashMap;
16
17use lazy_static::lazy_static;
18use tokio::sync::RwLock;
19use tonic::transport::Channel;
20
21lazy_static! {
22 pub static ref GLOBAL_Local_Node_Name: RwLock<String> = RwLock::new("".to_string());
23 pub static ref GLOBAL_Rustfs_Host: RwLock<String> = RwLock::new("".to_string());
24 pub static ref GLOBAL_Rustfs_Port: RwLock<String> = RwLock::new("9000".to_string());
25 pub static ref GLOBAL_Rustfs_Addr: RwLock<String> = RwLock::new("".to_string());
26 pub static ref GLOBAL_Conn_Map: RwLock<HashMap<String, Channel>> = RwLock::new(HashMap::new());
27}
28
29pub async fn set_global_addr(addr: &str) {
30 *GLOBAL_Rustfs_Addr.write().await = addr.to_string();
31}