pub struct HealthCheck {
pub cmd: String,
pub interval: Option<String>,
pub timeout: Option<String>,
pub retries: Option<u32>,
pub start_period: Option<String>,
}Expand description
Health check configuration for a container
Fields§
§cmd: StringCommand to run for health check
interval: Option<String>Time between running the check (default: 30s)
timeout: Option<String>Maximum time to wait for a check to complete (default: 30s)
retries: Option<u32>Number of consecutive failures needed to consider unhealthy (default: 3)
start_period: Option<String>Start period for the container to initialize before counting retries (default: 0s)
Implementations§
Source§impl HealthCheck
impl HealthCheck
Sourcepub fn with_interval(self, interval: &str) -> Self
pub fn with_interval(self, interval: &str) -> Self
Set the interval between health checks
Sourcepub fn with_timeout(self, timeout: &str) -> Self
pub fn with_timeout(self, timeout: &str) -> Self
Set the timeout for health checks
Sourcepub fn with_retries(self, retries: u32) -> Self
pub fn with_retries(self, retries: u32) -> Self
Set the number of retries for health checks
Sourcepub fn with_start_period(self, start_period: &str) -> Self
pub fn with_start_period(self, start_period: &str) -> Self
Set the start period for health checks
Trait Implementations§
Source§impl Clone for HealthCheck
impl Clone for HealthCheck
Source§fn clone(&self) -> HealthCheck
fn clone(&self) -> HealthCheck
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for HealthCheck
impl RefUnwindSafe for HealthCheck
impl Send for HealthCheck
impl Sync for HealthCheck
impl Unpin for HealthCheck
impl UnwindSafe for HealthCheck
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more