#[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: boolWhether to explicitly disable health checks for this instance.
host: StringHost header to send when performing an HTTP health check. Example: “myapp.appspot.com”
healthy_threshold: u32Number of consecutive successful health checks required before receiving traffic.
unhealthy_threshold: u32Number of consecutive failed health checks required before removing traffic.
restart_threshold: u32Number 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
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.
§Example
let x = HealthCheck::new().set_disable_health_check(true);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.
§Example
let x = HealthCheck::new().set_healthy_threshold(42_u32);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.
§Example
let x = HealthCheck::new().set_unhealthy_threshold(42_u32);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.
§Example
let x = HealthCheck::new().set_restart_threshold(42_u32);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.
§Example
use wkt::Duration;
let x = HealthCheck::new().set_check_interval(Duration::default()/* use setters */);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.
§Example
use wkt::Duration;
let x = HealthCheck::new().set_or_clear_check_interval(Some(Duration::default()/* use setters */));
let x = HealthCheck::new().set_or_clear_check_interval(None::<Duration>);Sourcepub fn set_timeout<T>(self, v: T) -> Self
pub fn set_timeout<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_timeout<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_timeout<T>(self, v: Option<T>) -> Self
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 moreSource§impl Debug for HealthCheck
impl Debug for HealthCheck
Source§impl Default for HealthCheck
impl Default for HealthCheck
Source§fn default() -> HealthCheck
fn default() -> HealthCheck
Source§impl Message for HealthCheck
impl Message for HealthCheck
Source§impl PartialEq for HealthCheck
impl PartialEq for HealthCheck
impl StructuralPartialEq for HealthCheck
Auto Trait Implementations§
impl Freeze for HealthCheck
impl RefUnwindSafe for HealthCheck
impl Send for HealthCheck
impl Sync for HealthCheck
impl Unpin for HealthCheck
impl UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request