pub struct Healthcheck {
pub disable: Option<bool>,
pub test: Option<StringOrList>,
pub interval: Option<String>,
pub start_period: Option<String>,
pub start_interval: Option<String>,
pub retries: Option<StringOrNum>,
pub timeout: Option<String>,
}Expand description
Declares a check that’s run to determine whether or not the service containers are “healthy”.
See more: https://docs.docker.com/reference/compose-file/services/#healthcheck
Fields§
§disable: Option<bool>Disable any container-specified healthcheck. Set to true to disable.
test: Option<StringOrList>The test to perform to check container health. Can be a string or a list. The first item is either NONE, CMD, or CMD-SHELL. If it’s CMD, the rest of the command is exec’d. If it’s CMD-SHELL, the rest is run in the shell.
interval: Option<String>Time between running the check (e.g., ‘1s’, ‘1m30s’). Default: 30s.
start_period: Option<String>Start period for the container to initialize before starting health-retries countdown (e.g., ‘1s’, ‘1m30s’). Default: 0s.
start_interval: Option<String>Time between running the check during the start period (e.g., ‘1s’, ‘1m30s’). Default: interval value.
retries: Option<StringOrNum>Number of consecutive failures needed to consider the container as unhealthy. Default: 3.
timeout: Option<String>Maximum time to allow one check to run (e.g., ‘1s’, ‘1m30s’). Default: 30s.
Trait Implementations§
Source§impl Clone for Healthcheck
impl Clone for Healthcheck
Source§fn clone(&self) -> Healthcheck
fn clone(&self) -> Healthcheck
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Healthcheck
impl Debug for Healthcheck
Source§impl Default for Healthcheck
impl Default for Healthcheck
Source§fn default() -> Healthcheck
fn default() -> Healthcheck
Source§impl<'de> Deserialize<'de> for Healthcheckwhere
Healthcheck: Default,
impl<'de> Deserialize<'de> for Healthcheckwhere
Healthcheck: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for Healthcheck
impl PartialEq for Healthcheck
Source§impl Serialize for Healthcheck
impl Serialize for Healthcheck
impl Eq for Healthcheck
impl StructuralPartialEq for Healthcheck
Auto Trait Implementations§
impl Freeze for Healthcheck
impl RefUnwindSafe for Healthcheck
impl Send for Healthcheck
impl Sync for Healthcheck
impl Unpin for Healthcheck
impl UnsafeUnpin for Healthcheck
impl UnwindSafe for Healthcheck
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.