pub struct Health {
pub test: HealthTest,
pub interval: u32,
pub timeout: u32,
pub retries: u32,
pub start_period: u32,
}Expand description
A healthcheck, its pace in seconds.
Fields§
§test: HealthTestWhat is tried.
interval: u32Seconds between two tries.
timeout: u32Seconds one try may take.
retries: u32Failed tries in a row before the machine is unhealthy.
start_period: u32Seconds after start before a failed try counts.
Implementations§
Source§impl Health
impl Health
Sourcepub fn of(h: &Healthcheck) -> Option<Health>
pub fn of(h: &Healthcheck) -> Option<Health>
The plan of a validated healthcheck; None when it says nothing to try.
Sourcepub fn shell_test(&self, wget: &str) -> String
pub fn shell_test(&self, wget: &str) -> String
The test as one line of shell, run inside the machine: the command as written, or the
page fetched with wget (busybox has it, as Isoloom’s probe does on the containers).
wget’s own failure on a 4xx or 5xx status is the unhealthy answer.
Trait Implementations§
impl Eq for Health
impl StructuralPartialEq for Health
Auto Trait Implementations§
impl Freeze for Health
impl RefUnwindSafe for Health
impl Send for Health
impl Sync for Health
impl Unpin for Health
impl UnsafeUnpin for Health
impl UnwindSafe for Health
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.