Skip to main content

ReadinessGate

Trait ReadinessGate 

Source
pub trait ReadinessGate: Send + Sync {
    // Required methods
    fn notify_ready<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn notify_not_ready<'life0, 'life1, 'async_trait>(
        &'life0 self,
        reason: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn notify_starting<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Readiness gate — local override that forces readiness state regardless of HealthSource. Name reflects actual role: a gate on local health state, not a push to external system.

Precedence (highest to lowest):

  1. notify_starting() → NotReady, always
  2. notify_not_ready(reason) → NotReady
  3. HealthSource::readiness() — fallback when no override active

Required Methods§

Source

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

Source

fn notify_not_ready<'life0, 'life1, 'async_trait>( &'life0 self, reason: &'life1 str, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

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

Implementors§