use std::sync::Arc;
#[allow(async_fn_in_trait)]
pub trait LatencyFaultTolerance<T>: Send + Sync + 'static {
async fn update_fault_item(&self, name: T, current_latency: u64, not_available_duration: u64, reachable: bool);
fn is_available(&self, name: &T) -> bool;
fn is_reachable(&self, name: &T) -> bool;
async fn remove(&self, name: &T);
async fn pick_one_at_least(&self) -> Option<T>;
fn start_detector(this: Arc<Self>);
fn shutdown(&self);
async fn detect_by_one_round(&self);
fn set_detect_timeout(&self, detect_timeout: u32);
fn set_detect_interval(&self, detect_interval: u32);
fn set_start_detector_enable(&self, start_detector_enable: bool);
fn is_start_detector_enable(&self) -> bool;
}