Trait mz_storage::healthcheck::HealthOperator

source ·
pub trait HealthOperator {
    // Required methods
    fn record_new_status<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        collection_id: GlobalId,
        ts: DateTime<Utc>,
        new_status: Status,
        new_error: Option<&'life1 str>,
        hints: &'life2 BTreeSet<String>,
        namespaced_errors: &'life3 BTreeMap<StatusNamespace, String>,
        write_namespaced_map: bool,
    ) -> Pin<Box<dyn Future<Output = ()> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn send_halt<'life0, 'async_trait>(
        &'life0 self,
        id: GlobalId,
        error: Option<(StatusNamespace, HealthStatusUpdate)>,
    ) -> Pin<Box<dyn Future<Output = ()> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn chosen_worker(&self) -> Option<usize> { ... }
}
Expand description

A trait that lets a user configure the health_operator with custom behavior. This is mostly useful for testing, and the DefaultWriter should be the correct implementation for everyone.

Required Methods§

source

fn record_new_status<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, collection_id: GlobalId, ts: DateTime<Utc>, new_status: Status, new_error: Option<&'life1 str>, hints: &'life2 BTreeSet<String>, namespaced_errors: &'life3 BTreeMap<StatusNamespace, String>, write_namespaced_map: bool, ) -> Pin<Box<dyn Future<Output = ()> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Record a new status.

source

fn send_halt<'life0, 'async_trait>( &'life0 self, id: GlobalId, error: Option<(StatusNamespace, HealthStatusUpdate)>, ) -> Pin<Box<dyn Future<Output = ()> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

source

fn chosen_worker(&self) -> Option<usize>

Optionally override the chosen worker index. Default is semi-random. Only useful for tests.

Implementors§