Some structure

This commit is contained in:
Ara Sadoyan
2025-02-12 12:17:15 +01:00
parent 4f998497bb
commit a2edbcfe73
7 changed files with 90 additions and 37 deletions

View File

@@ -15,11 +15,16 @@ pub fn run() {
let upstreams_map: DashMap<String, (Vec<(String, u16)>, AtomicUsize)> = DashMap::new();
let config = Arc::new(RwLock::new(upstreams_map));
let umap_full: DashMap<String, (Vec<(String, u16)>, AtomicUsize)> = DashMap::new();
let fconfig = Arc::new(RwLock::new(umap_full));
let lb = LB {
upstreams: config.clone(), // umap_full: config.clone()
upstreams: config.clone(),
umap_full: fconfig.clone(),
};
let bg = LB {
upstreams: config.clone(), // umap_full: config.clone()
upstreams: config.clone(),
umap_full: fconfig.clone(),
};
let bg_srvc = background_service("bgsrvc", bg);