#[non_exhaustive]pub struct Probe {
pub period_seconds: i32,
pub timeout_seconds: i32,
pub failure_threshold: i32,
pub success_threshold: i32,
pub initial_delay_seconds: i32,
pub probe_type: Option<ProbeType>,
/* private fields */
}dataset-service or job-service or model-garden-service or model-service or pipeline-service only.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.period_seconds: i32How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Must be less than timeout_seconds.
Maps to Kubernetes probe argument ‘periodSeconds’.
timeout_seconds: i32Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Must be greater or equal to period_seconds.
Maps to Kubernetes probe argument ‘timeoutSeconds’.
failure_threshold: i32Number of consecutive failures before the probe is considered failed. Defaults to 3. Minimum value is 1.
Maps to Kubernetes probe argument ‘failureThreshold’.
success_threshold: i32Number of consecutive successes before the probe is considered successful. Defaults to 1. Minimum value is 1.
Maps to Kubernetes probe argument ‘successThreshold’.
initial_delay_seconds: i32Number of seconds to wait before starting the probe. Defaults to 0. Minimum value is 0.
Maps to Kubernetes probe argument ‘initialDelaySeconds’.
probe_type: Option<ProbeType>Implementations§
Source§impl Probe
impl Probe
pub fn new() -> 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
Sets the value of period_seconds.
Sourcepub fn set_timeout_seconds<T: Into<i32>>(self, v: T) -> Self
pub fn set_timeout_seconds<T: Into<i32>>(self, v: T) -> Self
Sets the value of timeout_seconds.
Sourcepub fn set_failure_threshold<T: Into<i32>>(self, v: T) -> Self
pub fn set_failure_threshold<T: Into<i32>>(self, v: T) -> Self
Sets the value of failure_threshold.
Sourcepub fn set_success_threshold<T: Into<i32>>(self, v: T) -> Self
pub fn set_success_threshold<T: Into<i32>>(self, v: T) -> Self
Sets the value of success_threshold.
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.
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.
Sourcepub fn exec(&self) -> Option<&Box<ExecAction>>
pub fn exec(&self) -> Option<&Box<ExecAction>>
The value of probe_type
if it holds a Exec, None if the field is not set or
holds a different branch.
Sourcepub fn set_exec<T: Into<Box<ExecAction>>>(self, v: T) -> Self
pub fn set_exec<T: Into<Box<ExecAction>>>(self, v: T) -> Self
Sets the value of probe_type
to hold a Exec.
Note that all the setters affecting probe_type are
mutually exclusive.
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.
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.
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.