1 2 3 4 5 6 7 8 9 10 11
//! Failure detector trait. use std::time::Duration; pub trait FailureDetector: Send + Sync { fn is_available(&self) -> bool; fn is_monitoring(&self) -> bool; fn heartbeat(&self); fn reset(&self); fn since_last_heartbeat(&self) -> Option<Duration>; }