pingora_load_balancing::health_check

Trait HealthObserve

Source
pub trait HealthObserve {
    // Required method
    fn observe<'life0, 'life1, 'async_trait>(
        &'life0 self,
        target: &'life1 Backend,
        healthy: bool,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

HealthObserve is an interface for observing health changes of backends, this is what’s used for our health observation callback.

Required Methods§

Source

fn observe<'life0, 'life1, 'async_trait>( &'life0 self, target: &'life1 Backend, healthy: bool, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Observes the health of a Backend, can be used for monitoring purposes.

Implementors§