pub trait HealthCheckerTrait: Send + Sync {
// Required methods
fn check_node(
&self,
node_id: &NodeId,
) -> BoxFuture<'_, FederationResult<NodeHealth>>;
fn get_cached_health(&self, node_id: &NodeId) -> Option<NodeHealth>;
fn start_monitoring(&self, interval: Duration) -> BoxFuture<'_, ()>;
fn stop_monitoring(&self) -> BoxFuture<'_, ()>;
}Expand description
Health checker - monitors node health across federation
Required Methods§
Sourcefn check_node(
&self,
node_id: &NodeId,
) -> BoxFuture<'_, FederationResult<NodeHealth>>
fn check_node( &self, node_id: &NodeId, ) -> BoxFuture<'_, FederationResult<NodeHealth>>
Check health of a specific node
Sourcefn get_cached_health(&self, node_id: &NodeId) -> Option<NodeHealth>
fn get_cached_health(&self, node_id: &NodeId) -> Option<NodeHealth>
Get cached health status (non-blocking)
Sourcefn start_monitoring(&self, interval: Duration) -> BoxFuture<'_, ()>
fn start_monitoring(&self, interval: Duration) -> BoxFuture<'_, ()>
Start background health monitoring
Sourcefn stop_monitoring(&self) -> BoxFuture<'_, ()>
fn stop_monitoring(&self) -> BoxFuture<'_, ()>
Stop health monitoring