HealthCheck

Trait HealthCheck 

Source
pub trait HealthCheck: Send + Sync {
    // Required methods
    fn check<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = DMSCResult<DMSCHealthCheckResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn name(&self) -> &str;
    fn config(&self) -> &DMSCHealthCheckConfig;
}
Expand description

Trait for implementing custom health checks.

Required Methods§

Source

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

Performs the health check and returns the result.

Source

fn name(&self) -> &str

Returns the name of this health check.

Source

fn config(&self) -> &DMSCHealthCheckConfig

Returns the configuration for this health check.

Implementors§