Struct rustainers::HealthCheck
source · pub struct HealthCheck { /* private fields */ }
Expand description
A custom health check
Example
let hc = HealthCheck::builder()
.with_command("redis-cli --raw incr ping")
.with_start_period(Duration::from_millis(96))
.with_interval(Duration::from_millis(96))
.build();
Note that the command is executed inside the container
Implementations§
source§impl HealthCheck
impl HealthCheck
sourcepub fn builder() -> HealthCheckBuilder<((), (), (), (), ())>
pub fn builder() -> HealthCheckBuilder<((), (), (), (), ())>
Create a builder for building HealthCheck
.
On the builder, call .command(...)
, .interval(...)
(optional), .retries(...)
(optional), .start_period(...)
(optional), .timeout(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of HealthCheck
.
Trait Implementations§
source§impl Clone for HealthCheck
impl Clone for HealthCheck
source§fn clone(&self) -> HealthCheck
fn clone(&self) -> HealthCheck
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for HealthCheck
impl Debug for HealthCheck
source§impl From<HealthCheck> for WaitStrategy
impl From<HealthCheck> for WaitStrategy
source§fn from(value: HealthCheck) -> Self
fn from(value: HealthCheck) -> Self
Converts to this type from the input type.
source§impl PartialEq for HealthCheck
impl PartialEq for HealthCheck
source§fn eq(&self, other: &HealthCheck) -> bool
fn eq(&self, other: &HealthCheck) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for HealthCheck
impl StructuralEq for HealthCheck
impl StructuralPartialEq for HealthCheck
Auto Trait Implementations§
impl RefUnwindSafe for HealthCheck
impl Send for HealthCheck
impl Sync for HealthCheck
impl Unpin 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
Mutably borrows from an owned value. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.