pub struct Healthcheck { /* private fields */ }Expand description
Format-independent service health-check intent with field-level provenance.
Implementations§
Source§impl Healthcheck
impl Healthcheck
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates an empty health-check definition for incremental source-adapter mapping.
Sourcepub fn set_command(&mut self, command: Sourced<HealthcheckCommand>)
pub fn set_command(&mut self, command: Sourced<HealthcheckCommand>)
Sets the command executed by the runtime.
Sourcepub const fn command(&self) -> Option<&Sourced<HealthcheckCommand>>
pub const fn command(&self) -> Option<&Sourced<HealthcheckCommand>>
Returns the optional health command.
Sourcepub fn set_disabled(&mut self, disabled: Sourced<bool>)
pub fn set_disabled(&mut self, disabled: Sourced<bool>)
Retains an explicit enable/disable decision.
Sourcepub const fn disabled(&self) -> Option<&Sourced<bool>>
pub const fn disabled(&self) -> Option<&Sourced<bool>>
Returns the explicit disable decision, if the source supplied one.
Sourcepub fn set_interval(&mut self, interval: Sourced<HealthcheckDuration>)
pub fn set_interval(&mut self, interval: Sourced<HealthcheckDuration>)
Sets the interval between regular checks.
Sourcepub const fn interval(&self) -> Option<&Sourced<HealthcheckDuration>>
pub const fn interval(&self) -> Option<&Sourced<HealthcheckDuration>>
Returns the interval between regular checks.
Sourcepub fn set_timeout(&mut self, timeout: Sourced<HealthcheckDuration>)
pub fn set_timeout(&mut self, timeout: Sourced<HealthcheckDuration>)
Sets the maximum duration of one check.
Sourcepub const fn timeout(&self) -> Option<&Sourced<HealthcheckDuration>>
pub const fn timeout(&self) -> Option<&Sourced<HealthcheckDuration>>
Returns the maximum duration of one check.
Sourcepub fn set_retries(&mut self, retries: Sourced<HealthcheckRetries>)
pub fn set_retries(&mut self, retries: Sourced<HealthcheckRetries>)
Sets the number of failures required before becoming unhealthy.
Sourcepub const fn retries(&self) -> Option<&Sourced<HealthcheckRetries>>
pub const fn retries(&self) -> Option<&Sourced<HealthcheckRetries>>
Returns the failure threshold.
Sourcepub fn set_start_period(&mut self, start_period: Sourced<HealthcheckDuration>)
pub fn set_start_period(&mut self, start_period: Sourced<HealthcheckDuration>)
Sets the startup grace period.
Sourcepub const fn start_period(&self) -> Option<&Sourced<HealthcheckDuration>>
pub const fn start_period(&self) -> Option<&Sourced<HealthcheckDuration>>
Returns the startup grace period.
Sourcepub fn set_start_interval(
&mut self,
start_interval: Sourced<HealthcheckDuration>,
)
pub fn set_start_interval( &mut self, start_interval: Sourced<HealthcheckDuration>, )
Sets the check interval used during the startup grace period.
Sourcepub const fn start_interval(&self) -> Option<&Sourced<HealthcheckDuration>>
pub const fn start_interval(&self) -> Option<&Sourced<HealthcheckDuration>>
Returns the check interval used during the startup grace period.
Trait Implementations§
Source§impl Clone for Healthcheck
impl Clone for Healthcheck
Source§fn clone(&self) -> Healthcheck
fn clone(&self) -> Healthcheck
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more