pub struct HealthCheck {Show 13 fields
pub record_id: Uuid,
pub check_type: String,
pub name: Option<String>,
pub config: Value,
pub interval: u32,
pub timeout: u32,
pub retries: Option<u32>,
pub retry_interval: Option<u32>,
pub last_status: String,
pub last_checked_at: Option<i64>,
pub last_error: Option<String>,
pub created_at: i64,
pub updated_at: i64,
}Expand description
A health check on one record value (record_id is its key: one check per value).
Durations are seconds, as on the wire. It runs only while the value’s
host_health is
Auto; there is no separate on/off switch.
Fields§
§record_id: UuidThe checked record value; also the check’s id.
check_type: Stringhttp, tcp or ping.
name: Option<String>Free-form label.
config: ValueType-specific settings; see HealthCheckConfig for the known shapes.
interval: u32Time between checks, seconds.
timeout: u32Time one attempt may take, seconds.
retries: Option<u32>Extra attempts before the value counts as unhealthy.
retry_interval: Option<u32>Time between retries, seconds; Core waits 5 s when it is None.
last_status: StringLive status: UNKNOWN, HEALTHY or UNHEALTHY. UNKNOWN while the value is not
on Auto and before the first run after any mode change.
last_checked_at: Option<i64>Unix seconds; absent while the status is UNKNOWN.
last_error: Option<String>Why the last attempt failed.
created_at: i64Unix seconds.
updated_at: i64Unix seconds.
Implementations§
Source§impl HealthCheck
impl HealthCheck
Sourcepub fn typed_config(&self) -> Option<HealthCheckConfig>
pub fn typed_config(&self) -> Option<HealthCheckConfig>
The config in its typed form, if the type and shape are known.
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