#[non_exhaustive]pub struct HealthCheck {
pub disable_health_check: bool,
pub host: String,
pub healthy_threshold: u32,
pub unhealthy_threshold: u32,
pub restart_threshold: u32,
pub check_interval: Option<Duration>,
pub timeout: Option<Duration>,
/* private fields */
}
Expand description
Health checking configuration for VM instances. Unhealthy instances are killed and replaced with new instances. Only applicable for instances in App Engine flexible environment.
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.disable_health_check: bool
Whether to explicitly disable health checks for this instance.
host: String
Host header to send when performing an HTTP health check. Example: “myapp.appspot.com”
healthy_threshold: u32
Number of consecutive successful health checks required before receiving traffic.
unhealthy_threshold: u32
Number of consecutive failed health checks required before removing traffic.
restart_threshold: u32
Number of consecutive failed health checks required before an instance is restarted.
check_interval: Option<Duration>
Interval between health checks.
timeout: Option<Duration>
Time before the health check is considered failed.
Implementations§
Source§impl HealthCheck
impl HealthCheck
pub fn new() -> Self
Sourcepub fn set_disable_health_check<T: Into<bool>>(self, v: T) -> Self
pub fn set_disable_health_check<T: Into<bool>>(self, v: T) -> Self
Sets the value of disable_health_check.
Sourcepub fn set_healthy_threshold<T: Into<u32>>(self, v: T) -> Self
pub fn set_healthy_threshold<T: Into<u32>>(self, v: T) -> Self
Sets the value of healthy_threshold.
Sourcepub fn set_unhealthy_threshold<T: Into<u32>>(self, v: T) -> Self
pub fn set_unhealthy_threshold<T: Into<u32>>(self, v: T) -> Self
Sets the value of unhealthy_threshold.
Sourcepub fn set_restart_threshold<T: Into<u32>>(self, v: T) -> Self
pub fn set_restart_threshold<T: Into<u32>>(self, v: T) -> Self
Sets the value of restart_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.
Trait Implementations§
Source§impl Clone for HealthCheck
impl Clone for HealthCheck
Source§fn clone(&self) -> HealthCheck
fn clone(&self) -> HealthCheck
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more