Skip to main content

RiHealthCheckProvider

Trait RiHealthCheckProvider 

Source
pub trait RiHealthCheckProvider: Send + Sync {
    // Required method
    fn check_health<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        endpoint: &'life1 str,
        config: &'life2 RiHealthCheckConfig,
    ) -> Pin<Box<dyn Future<Output = RiResult<RiHealthCheckResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Trait for implementing health check providers.

This trait defines the interface for health check providers, allowing for different health check implementations based on protocol.

Required Methods§

Source

fn check_health<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, endpoint: &'life1 str, config: &'life2 RiHealthCheckConfig, ) -> Pin<Box<dyn Future<Output = RiResult<RiHealthCheckResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Performs a health check on the specified endpoint.

§Parameters
  • endpoint: The endpoint to check
  • config: Health check configuration
§Returns

A RiResult<RiHealthCheckResult> containing the health check result

Implementors§