Trait mz_storage::healthcheck::HealthStatus
source · pub(crate) trait HealthStatus: ExchangeData + Debug + Ord {
// Required methods
fn name(&self) -> &'static str;
fn error(&self) -> Option<&str>;
fn hint(&self) -> Option<&str>;
fn should_halt(&self) -> bool;
fn can_transition_from(&self, other: Option<&Self>) -> bool;
fn starting() -> Self;
}
Expand description
A trait that lets a user of the health_operator
specify a health status object.
In addition to these methods, heath statuses should:
- Be cloneable/exhangeable so they can be moved around in timely.
Debug
-printable.Ord
, where the order increases in severity. The state returned bystarting()
should be the minimum.
Required Methods§
sourcefn should_halt(&self) -> bool
fn should_halt(&self) -> bool
Whether or not we should halt the dataflow instances and restart it.
sourcefn can_transition_from(&self, other: Option<&Self>) -> bool
fn can_transition_from(&self, other: Option<&Self>) -> bool
Whether or not we can transition from a state (or lack of one).
Each time this returns true
, a new status message will be communicated to the user.
Note that messages that are identical except for should_halt
don’t need to be
able to transition between each other, that is handled separately.