pub trait UpstreamProvider: Send + Sync {
// Required methods
fn get(&self, name: &str) -> Option<Arc<Upstream>>;
fn list(&self) -> Vec<(String, Arc<Upstream>)>;
// Provided methods
fn healthy_status(&self) -> HashMap<String, UpstreamHealthyStatus> { ... }
fn get_all_stats(&self) -> HashMap<String, UpstreamStats> { ... }
}Expand description
Upstream provider trait
Required Methods§
Provided Methods§
Sourcefn healthy_status(&self) -> HashMap<String, UpstreamHealthyStatus>
fn healthy_status(&self) -> HashMap<String, UpstreamHealthyStatus>
Get the healthy status of all upstreams
§Returns
HashMap<String, UpstreamHealthyStatus>- Healthy status of all upstreams
This function iterates through all upstreams and checks their health status.