#[non_exhaustive]pub struct Probe {
pub initial_delay_seconds: i32,
pub timeout_seconds: i32,
pub period_seconds: i32,
pub failure_threshold: i32,
pub probe_type: Option<ProbeType>,
/* private fields */
}Expand description
Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.
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.initial_delay_seconds: i32Optional. Number of seconds after the container has started before the probe is initiated. Defaults to 0 seconds. Minimum value is 0. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240.
timeout_seconds: i32Optional. Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Maximum value is 3600. Must be smaller than period_seconds.
period_seconds: i32Optional. How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. Must be greater or equal than timeout_seconds.
failure_threshold: i32Optional. Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.
probe_type: Option<ProbeType>Implementations§
Source§impl Probe
impl Probe
pub fn new() -> Self
Sourcepub fn set_initial_delay_seconds<T: Into<i32>>(self, v: T) -> Self
pub fn set_initial_delay_seconds<T: Into<i32>>(self, v: T) -> Self
Sets the value of initial_delay_seconds.
§Example
let x = Probe::new().set_initial_delay_seconds(42);Sourcepub fn set_timeout_seconds<T: Into<i32>>(self, v: T) -> Self
pub fn set_timeout_seconds<T: Into<i32>>(self, v: T) -> Self
Sourcepub fn set_period_seconds<T: Into<i32>>(self, v: T) -> Self
pub fn set_period_seconds<T: Into<i32>>(self, v: T) -> Self
Sourcepub fn set_failure_threshold<T: Into<i32>>(self, v: T) -> Self
pub fn set_failure_threshold<T: Into<i32>>(self, v: T) -> Self
Sourcepub fn set_probe_type<T: Into<Option<ProbeType>>>(self, v: T) -> Self
pub fn set_probe_type<T: Into<Option<ProbeType>>>(self, v: T) -> Self
Sets the value of probe_type.
Note that all the setters affecting probe_type are mutually
exclusive.
§Example
use google_cloud_run_v2::model::HTTPGetAction;
let x = Probe::new().set_probe_type(Some(
google_cloud_run_v2::model::probe::ProbeType::HttpGet(HTTPGetAction::default().into())));Sourcepub fn http_get(&self) -> Option<&Box<HTTPGetAction>>
pub fn http_get(&self) -> Option<&Box<HTTPGetAction>>
The value of probe_type
if it holds a HttpGet, None if the field is not set or
holds a different branch.
Sourcepub fn set_http_get<T: Into<Box<HTTPGetAction>>>(self, v: T) -> Self
pub fn set_http_get<T: Into<Box<HTTPGetAction>>>(self, v: T) -> Self
Sets the value of probe_type
to hold a HttpGet.
Note that all the setters affecting probe_type are
mutually exclusive.
§Example
use google_cloud_run_v2::model::HTTPGetAction;
let x = Probe::new().set_http_get(HTTPGetAction::default()/* use setters */);
assert!(x.http_get().is_some());
assert!(x.tcp_socket().is_none());
assert!(x.grpc().is_none());Sourcepub fn tcp_socket(&self) -> Option<&Box<TCPSocketAction>>
pub fn tcp_socket(&self) -> Option<&Box<TCPSocketAction>>
The value of probe_type
if it holds a TcpSocket, None if the field is not set or
holds a different branch.
Sourcepub fn set_tcp_socket<T: Into<Box<TCPSocketAction>>>(self, v: T) -> Self
pub fn set_tcp_socket<T: Into<Box<TCPSocketAction>>>(self, v: T) -> Self
Sets the value of probe_type
to hold a TcpSocket.
Note that all the setters affecting probe_type are
mutually exclusive.
§Example
use google_cloud_run_v2::model::TCPSocketAction;
let x = Probe::new().set_tcp_socket(TCPSocketAction::default()/* use setters */);
assert!(x.tcp_socket().is_some());
assert!(x.http_get().is_none());
assert!(x.grpc().is_none());Sourcepub fn grpc(&self) -> Option<&Box<GRPCAction>>
pub fn grpc(&self) -> Option<&Box<GRPCAction>>
The value of probe_type
if it holds a Grpc, None if the field is not set or
holds a different branch.
Sourcepub fn set_grpc<T: Into<Box<GRPCAction>>>(self, v: T) -> Self
pub fn set_grpc<T: Into<Box<GRPCAction>>>(self, v: T) -> Self
Sets the value of probe_type
to hold a Grpc.
Note that all the setters affecting probe_type are
mutually exclusive.
§Example
use google_cloud_run_v2::model::GRPCAction;
let x = Probe::new().set_grpc(GRPCAction::default()/* use setters */);
assert!(x.grpc().is_some());
assert!(x.http_get().is_none());
assert!(x.tcp_socket().is_none());