#[non_exhaustive]pub struct LivenessCheck {
pub path: String,
pub host: String,
pub failure_threshold: u32,
pub success_threshold: u32,
pub check_interval: Option<Duration>,
pub timeout: Option<Duration>,
pub initial_delay: Option<Duration>,
/* private fields */
}
Expand description
Health checking configuration for VM instances. Unhealthy instances are killed and replaced with new instances.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.path: String
The request path.
host: String
Host header to send when performing a HTTP Liveness check. Example: “myapp.appspot.com”
failure_threshold: u32
Number of consecutive failed checks required before considering the VM unhealthy.
success_threshold: u32
Number of consecutive successful checks required before considering the VM healthy.
check_interval: Option<Duration>
Interval between health checks.
timeout: Option<Duration>
Time before the check is considered failed.
initial_delay: Option<Duration>
The initial delay before starting to execute the checks.
Implementations§
Source§impl LivenessCheck
impl LivenessCheck
pub fn new() -> Self
Sourcepub fn set_failure_threshold<T: Into<u32>>(self, v: T) -> Self
pub fn set_failure_threshold<T: Into<u32>>(self, v: T) -> Self
Sets the value of failure_threshold.
Sourcepub fn set_success_threshold<T: Into<u32>>(self, v: T) -> Self
pub fn set_success_threshold<T: Into<u32>>(self, v: T) -> Self
Sets the value of success_threshold.
Sourcepub fn set_check_interval<T>(self, v: T) -> Self
pub fn set_check_interval<T>(self, v: T) -> Self
Sets the value of check_interval.
Sourcepub fn set_or_clear_check_interval<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_check_interval<T>(self, v: Option<T>) -> Self
Sets or clears the value of check_interval.
Sourcepub fn set_timeout<T>(self, v: T) -> Self
pub fn set_timeout<T>(self, v: T) -> Self
Sets the value of timeout.
Sourcepub fn set_or_clear_timeout<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_timeout<T>(self, v: Option<T>) -> Self
Sets or clears the value of timeout.
Sourcepub fn set_initial_delay<T>(self, v: T) -> Self
pub fn set_initial_delay<T>(self, v: T) -> Self
Sets the value of initial_delay.
Sourcepub fn set_or_clear_initial_delay<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_initial_delay<T>(self, v: Option<T>) -> Self
Sets or clears the value of initial_delay.
Trait Implementations§
Source§impl Clone for LivenessCheck
impl Clone for LivenessCheck
Source§fn clone(&self) -> LivenessCheck
fn clone(&self) -> LivenessCheck
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more