Some type changes

This commit is contained in:
Ara Sadoyan
2025-05-21 16:49:37 +02:00
parent fce25b8d15
commit 3e93920a0d
3 changed files with 7 additions and 5 deletions

View File

@@ -75,7 +75,8 @@ pub async fn hc2(upslist: Arc<UpstreamsDashMap>, fullist: Arc<UpstreamsDashMap>,
if first_run == 1 { if first_run == 1 {
info!("Performing initial hatchecks and upstreams ssl detection"); info!("Performing initial hatchecks and upstreams ssl detection");
clone_idmap_into(&totest, &idlist); clone_idmap_into(&totest, &idlist);
info!("Gazan is up and ready to serve requests"); info!("Gazan is up and ready to serve requests, the upstreams list is:");
print_upstreams(&totest)
} }
first_run+=1; first_run+=1;

View File

@@ -3,8 +3,9 @@ use serde::{Deserialize, Serialize};
use std::collections::HashMap; use std::collections::HashMap;
use std::sync::atomic::AtomicUsize; use std::sync::atomic::AtomicUsize;
pub type UpstreamsDashMap = DashMap<String, DashMap<String, (Vec<(String, u16, bool, bool)>, AtomicUsize)>>; pub type InnerMap = (String, u16, bool, bool);
pub type UpstreamsIdMap = DashMap<String, (String, u16, bool, bool)>; pub type UpstreamsDashMap = DashMap<String, DashMap<String, (Vec<InnerMap>, AtomicUsize)>>;
pub type UpstreamsIdMap = DashMap<String, InnerMap>;
pub type Headers = DashMap<String, DashMap<String, Vec<(String, String)>>>; pub type Headers = DashMap<String, DashMap<String, Vec<(String, String)>>>;
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]

View File

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