Skip to main content

HealthApi

Trait HealthApi 

Source
pub trait HealthApi: Send + Sync {
    // Required method
    fn check_health<'life0, 'async_trait>(
        &'life0 self,
        probe: HealthProbe,
        timeout: Duration,
    ) -> Pin<Box<dyn Future<Output = Result<HealthReport>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Adapter boundary for public health endpoints.

Required Methods§

Source

fn check_health<'life0, 'async_trait>( &'life0 self, probe: HealthProbe, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<HealthReport>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Run one health probe with an explicit upper time bound.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§