pub struct Healthcheck {
pub test: Option<CommandLine>,
pub http: Option<HttpCheck>,
pub interval: Option<String>,
pub timeout: Option<String>,
pub retries: Option<u32>,
pub start_period: Option<String>,
}Expand description
When a machine counts as healthy, besides its ports answering: a command that
succeeds, or a page that answers. Each target waits for it where it waits for the machine
(Compose’s depends_on and up --wait, Kubernetes’ readiness, the end of a VM’s set-up).
Fields§
§test: Option<CommandLine>A command run inside the machine: healthy when it exits with 0 (exactly one of test
and http). The image’s or the VM’s own tools run it (pg_isready, redis-cli ping).
http: Option<HttpCheck>A page the machine serves: healthy when it answers with a 2xx or 3xx status.
interval: Option<String>The time between two tries (5s, 1m, 1m30s). Default: 5s.
timeout: Option<String>How long one try may take before it counts as failed. Default: 3s.
retries: Option<u32>Failed tries in a row before the machine counts as unhealthy (a VM’s set-up then fails). Default: 60.
start_period: Option<String>A grace period after start before the first try counts (30s). Default: 10s.
Trait Implementations§
Source§impl Clone for Healthcheck
impl Clone for Healthcheck
Source§impl Debug for Healthcheck
impl Debug for Healthcheck
Source§impl<'de> Deserialize<'de> for Healthcheck
impl<'de> Deserialize<'de> for Healthcheck
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>,
impl Eq for Healthcheck
Source§impl JsonSchema for Healthcheck
impl JsonSchema for Healthcheck
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for Healthcheck
impl PartialEq for Healthcheck
Source§impl Serialize for Healthcheck
impl Serialize 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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.