Added whitelisted or all services support t Consul

This commit is contained in:
Ara Sadoyan
2025-04-04 17:38:18 +02:00
parent 23dae51e22
commit b2823508b7
6 changed files with 111 additions and 90 deletions

View File

@@ -95,7 +95,8 @@ impl BackgroundService for LB {
}
}
}
// print_upstreams(&self.ump_full);
info!("Upstreams list is changed, updating to:");
print_upstreams(&self.ump_full);
}
None => {}
}

View File

@@ -25,7 +25,7 @@ pub async fn run_server(bindaddress: String, mut toreturn: Sender<(UpstreamsDash
match serverlist {
Some(serverlist) => {
let _ = tr.send((serverlist.0, serverlist.1)).await.unwrap();
let _ = tr.send((serverlist.upstreams, serverlist.headers)).await.unwrap();
Response::builder().status(StatusCode::CREATED).body(Body::from("Config, conf file, updated!\n")).unwrap()
}
None => Response::builder()