#[non_exhaustive]pub struct ReadinessCheck {
pub path: String,
pub host: String,
pub failure_threshold: u32,
pub success_threshold: u32,
pub check_interval: Option<Duration>,
pub timeout: Option<Duration>,
pub app_start_timeout: Option<Duration>,
/* private fields */
}Expand description
Readiness checking configuration for VM instances. Unhealthy instances are removed from traffic rotation.
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: StringThe request path.
host: StringHost header to send when performing a HTTP Readiness check. Example: “myapp.appspot.com”
failure_threshold: u32Number of consecutive failed checks required before removing traffic.
success_threshold: u32Number of consecutive successful checks required before receiving traffic.
check_interval: Option<Duration>Interval between health checks.
timeout: Option<Duration>Time before the check is considered failed.
app_start_timeout: Option<Duration>A maximum time limit on application initialization, measured from moment the application successfully replies to a healthcheck until it is ready to serve traffic.
Implementations§
Source§impl ReadinessCheck
impl ReadinessCheck
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.
§Example
let x = ReadinessCheck::new().set_failure_threshold(42_u32);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.
§Example
let x = ReadinessCheck::new().set_success_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 = ReadinessCheck::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 = ReadinessCheck::new().set_or_clear_check_interval(Some(Duration::default()/* use setters */));
let x = ReadinessCheck::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
Sourcepub fn set_app_start_timeout<T>(self, v: T) -> Self
pub fn set_app_start_timeout<T>(self, v: T) -> Self
Sets the value of app_start_timeout.
§Example
use wkt::Duration;
let x = ReadinessCheck::new().set_app_start_timeout(Duration::default()/* use setters */);Sourcepub fn set_or_clear_app_start_timeout<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_app_start_timeout<T>(self, v: Option<T>) -> Self
Sets or clears the value of app_start_timeout.
§Example
use wkt::Duration;
let x = ReadinessCheck::new().set_or_clear_app_start_timeout(Some(Duration::default()/* use setters */));
let x = ReadinessCheck::new().set_or_clear_app_start_timeout(None::<Duration>);Trait Implementations§
Source§impl Clone for ReadinessCheck
impl Clone for ReadinessCheck
Source§fn clone(&self) -> ReadinessCheck
fn clone(&self) -> ReadinessCheck
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 ReadinessCheck
impl Debug for ReadinessCheck
Source§impl Default for ReadinessCheck
impl Default for ReadinessCheck
Source§fn default() -> ReadinessCheck
fn default() -> ReadinessCheck
Source§impl Message for ReadinessCheck
impl Message for ReadinessCheck
Source§impl PartialEq for ReadinessCheck
impl PartialEq for ReadinessCheck
impl StructuralPartialEq for ReadinessCheck
Auto Trait Implementations§
impl Freeze for ReadinessCheck
impl RefUnwindSafe for ReadinessCheck
impl Send for ReadinessCheck
impl Sync for ReadinessCheck
impl Unpin for ReadinessCheck
impl UnsafeUnpin for ReadinessCheck
impl UnwindSafe for ReadinessCheck
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