pub struct CheckRestart {
pub limit: u32,
pub grace: Duration,
pub ignore_warnings: bool,
}Expand description
CheckRestart is an object which enables restarting of tasks based upon Consul health checks.
Fields§
§limit: u32The number of unhealthy checks allowed before the service is restarted. Defaults to 0 which disables health-based restarts.
grace: DurationThe duration to wait after a task starts or restarts before counting unhealthy checks count against the limit. Defaults to 1 second.
ignore_warnings: boolTreat checks that are warning as passing. Defaults to false which means warnings are considered unhealthy.
Trait Implementations§
Source§impl Clone for CheckRestart
impl Clone for CheckRestart
Source§fn clone(&self) -> CheckRestart
fn clone(&self) -> CheckRestart
Returns a duplicate 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 CheckRestart
impl Debug for CheckRestart
Source§impl Default for CheckRestart
impl Default for CheckRestart
Source§impl<'de> Deserialize<'de> for CheckRestart
impl<'de> Deserialize<'de> for CheckRestart
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for CheckRestart
impl PartialEq for CheckRestart
Source§impl Serialize for CheckRestart
impl Serialize for CheckRestart
impl Eq for CheckRestart
impl StructuralPartialEq for CheckRestart
Auto Trait Implementations§
impl Freeze for CheckRestart
impl RefUnwindSafe for CheckRestart
impl Send for CheckRestart
impl Sync for CheckRestart
impl Unpin for CheckRestart
impl UnwindSafe for CheckRestart
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
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
Compare self to
key and return true if they are equal.