Skip to main content

HealthCheckerTrait

Trait HealthCheckerTrait 

Source
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§

Source

fn check_node( &self, node_id: &NodeId, ) -> BoxFuture<'_, FederationResult<NodeHealth>>

Check health of a specific node

Source

fn get_cached_health(&self, node_id: &NodeId) -> Option<NodeHealth>

Get cached health status (non-blocking)

Source

fn start_monitoring(&self, interval: Duration) -> BoxFuture<'_, ()>

Start background health monitoring

Source

fn stop_monitoring(&self) -> BoxFuture<'_, ()>

Stop health monitoring

Implementors§