pub struct OciHealthcheck {
pub test: Vec<String>,
pub interval: Option<String>,
pub timeout: Option<String>,
pub retries: Option<u32>,
pub start_period: Option<String>,
}Expand description
OCI healthcheck shape used by OciImageConfig.
The Dockerfile HealthcheckInstruction::Check variant carries
Duration values; we normalise them to OCI’s string form
("30s", "1m30s", …) at the point of capture so 4.D can serialise
the struct without re-formatting. disabled corresponds to
HEALTHCHECK NONE and round-trips as Test == ["NONE"] per the
OCI / Docker convention.
Fields§
§test: Vec<String>Healthcheck command. For HEALTHCHECK NONE this is
vec!["NONE".to_string()]; for HEALTHCHECK CMD … this is
["CMD-SHELL", "<cmd>"] (shell form) or
["CMD", "<arg0>", "<arg1>", …] (exec form).
interval: Option<String>Interval between consecutive checks (OCI string form).
timeout: Option<String>Per-check Timeout (OCI string form).
retries: Option<u32>Retries before transition to unhealthy.
start_period: Option<String>StartPeriod grace before the first check is counted (OCI
string form).
Implementations§
Source§impl OciHealthcheck
impl OciHealthcheck
Sourcepub fn disabled() -> Self
pub fn disabled() -> Self
Build the sentinel value for HEALTHCHECK NONE. Reads cleanly in
the emit path: if hc.is_disabled() { "NONE" } else { … }.
Sourcepub fn is_disabled(&self) -> bool
pub fn is_disabled(&self) -> bool
true iff this healthcheck is the sentinel produced by
OciHealthcheck::disabled.
Trait Implementations§
Source§impl Clone for OciHealthcheck
impl Clone for OciHealthcheck
Source§fn clone(&self) -> OciHealthcheck
fn clone(&self) -> OciHealthcheck
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for OciHealthcheck
impl RefUnwindSafe for OciHealthcheck
impl Send for OciHealthcheck
impl Sync for OciHealthcheck
impl Unpin for OciHealthcheck
impl UnsafeUnpin for OciHealthcheck
impl UnwindSafe for OciHealthcheck
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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