#[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
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_timeout_seconds<T: Into<i32>>(self, v: T) -> Self
pub fn set_timeout_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_success_threshold<T: Into<i32>>(self, v: T) -> Self
pub fn set_success_threshold<T: Into<i32>>(self, v: T) -> 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_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_aiplatform_v1::model::probe::ExecAction;
let x = Probe::new().set_probe_type(Some(
google_cloud_aiplatform_v1::model::probe::ProbeType::Exec(ExecAction::default().into())));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.
§Example
use google_cloud_aiplatform_v1::model::probe::ExecAction;
let x = Probe::new().set_exec(ExecAction::default()/* use setters */);
assert!(x.exec().is_some());
assert!(x.http_get().is_none());
assert!(x.grpc().is_none());
assert!(x.tcp_socket().is_none());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_aiplatform_v1::model::probe::HttpGetAction;
let x = Probe::new().set_http_get(HttpGetAction::default()/* use setters */);
assert!(x.http_get().is_some());
assert!(x.exec().is_none());
assert!(x.grpc().is_none());
assert!(x.tcp_socket().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_aiplatform_v1::model::probe::GrpcAction;
let x = Probe::new().set_grpc(GrpcAction::default()/* use setters */);
assert!(x.grpc().is_some());
assert!(x.exec().is_none());
assert!(x.http_get().is_none());
assert!(x.tcp_socket().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_aiplatform_v1::model::probe::TcpSocketAction;
let x = Probe::new().set_tcp_socket(TcpSocketAction::default()/* use setters */);
assert!(x.tcp_socket().is_some());
assert!(x.exec().is_none());
assert!(x.http_get().is_none());
assert!(x.grpc().is_none());Trait Implementations§
impl StructuralPartialEq for Probe
Auto Trait Implementations§
impl Freeze for Probe
impl RefUnwindSafe for Probe
impl Send for Probe
impl Sync for Probe
impl Unpin for Probe
impl UnsafeUnpin for Probe
impl UnwindSafe for Probe
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