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§
Sourcefn 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_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
Sourcefn 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 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
Sourcefn config(&self) -> &HealthCheckConfig
fn config(&self) -> &HealthCheckConfig
Get health check configuration