Skip to main content

HealthChecker

Trait HealthChecker 

Source
pub trait HealthChecker: Send + Sync {
    // Required methods
    fn check_health<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = HealthStatus> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn check_component<'life0, 'life1, 'async_trait>(
        &'life0 self,
        component: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = ComponentHealth> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn config(&self) -> &HealthCheckConfig;
}
Expand description

Health check provider

Required Methods§

Source

fn check_health<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = HealthStatus> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Perform health check

Source

fn check_component<'life0, 'life1, 'async_trait>( &'life0 self, component: &'life1 str, ) -> Pin<Box<dyn Future<Output = ComponentHealth> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Check specific component

Source

fn config(&self) -> &HealthCheckConfig

Get health check configuration

Implementors§