Early stage Consul http api support

This commit is contained in:
Ara Sadoyan
2025-04-02 18:58:46 +02:00
parent cbbf45092b
commit 23dae51e22
13 changed files with 536 additions and 74 deletions

View File

@@ -20,7 +20,7 @@ pub async fn start(fp: String, mut toreturn: Sender<(UpstreamsDashMap, Headers)>
match snd {
Some(snd) => {
toreturn.send(snd).await.unwrap();
toreturn.send((snd.0, snd.1)).await.unwrap();
}
None => {}
}
@@ -49,11 +49,11 @@ pub async fn start(fp: String, mut toreturn: Sender<(UpstreamsDashMap, Headers)>
if e.paths[0].to_str().unwrap().ends_with("yaml") {
if start.elapsed() > Duration::from_secs(2) {
start = Instant::now();
info!("Config File changed :=> {:?}", e);
// info!("Config File changed :=> {:?}", e);
let snd = load_configuration(file_path, "filepath");
match snd {
Some(snd) => {
toreturn.send(snd).await.unwrap();
toreturn.send((snd.0, snd.1)).await.unwrap();
}
None => {}
}