Skip to main content

ConsecutiveFailurePolicyBuilder

Struct ConsecutiveFailurePolicyBuilder 

Source
pub struct ConsecutiveFailurePolicyBuilder<___State = __ConsecutiveFailurePolicyBuilderInitialState> { /* private fields */ }
Expand description

Use builder syntax to set the required parameters and finish by calling the method Self::build().

Implementations§

Source§

impl<__FailureThreshold, __RecoverySuccesses, __ProbeInterval> ConsecutiveFailurePolicyBuilder<(__FailureThreshold, __RecoverySuccesses, __ProbeInterval)>

Source

pub fn build(self) -> ConsecutiveFailurePolicy
where __FailureThreshold: IntoSet<Option<u32>, ConsecutiveFailurePolicyBuilder__failure_threshold>, __RecoverySuccesses: IntoSet<Option<u32>, ConsecutiveFailurePolicyBuilder__recovery_successes>, __ProbeInterval: IntoSet<Option<Duration>, ConsecutiveFailurePolicyBuilder__probe_interval>,

Finishes building and returns the requested object.

Source

pub fn maybe_failure_threshold( self, value: Option<u32>, ) -> <Self as __ConsecutiveFailurePolicyBuilderSetMember>::FailureThreshold
where __FailureThreshold: IsUnset,

Same as Self::failure_threshold, but accepts an Option as input. See that method’s documentation for more details.

Source

pub fn failure_threshold( self, value: u32, ) -> <Self as __ConsecutiveFailurePolicyBuilderSetMember>::FailureThreshold
where __FailureThreshold: IsUnset,

Number of consecutive failures before a node becomes Unhealthy. At ⌈threshold/2⌉ failures the node first enters Degraded. Default: 3.

Source

pub fn maybe_recovery_successes( self, value: Option<u32>, ) -> <Self as __ConsecutiveFailurePolicyBuilderSetMember>::RecoverySuccesses
where __RecoverySuccesses: IsUnset,

Same as Self::recovery_successes, but accepts an Option as input. See that method’s documentation for more details.

Source

pub fn recovery_successes( self, value: u32, ) -> <Self as __ConsecutiveFailurePolicyBuilderSetMember>::RecoverySuccesses
where __RecoverySuccesses: IsUnset,

Number of consecutive successes an Unhealthy / Recovering node needs before returning to Healthy. Default: 2.

Source

pub fn maybe_probe_interval( self, value: Option<Duration>, ) -> <Self as __ConsecutiveFailurePolicyBuilderSetMember>::ProbeInterval
where __ProbeInterval: IsUnset,

Same as Self::probe_interval, but accepts an Option as input. See that method’s documentation for more details.

Source

pub fn probe_interval( self, value: Duration, ) -> <Self as __ConsecutiveFailurePolicyBuilderSetMember>::ProbeInterval
where __ProbeInterval: IsUnset,

Minimum time after the last failure before an Unhealthy node is eligible for a probe request. Default: 10 s.

Auto Trait Implementations§

§

impl<___State> Freeze for ConsecutiveFailurePolicyBuilder<___State>
where ___State: Freeze,

§

impl<___State> RefUnwindSafe for ConsecutiveFailurePolicyBuilder<___State>
where ___State: RefUnwindSafe,

§

impl<___State> Send for ConsecutiveFailurePolicyBuilder<___State>
where ___State: Send,

§

impl<___State> Sync for ConsecutiveFailurePolicyBuilder<___State>
where ___State: Sync,

§

impl<___State> Unpin for ConsecutiveFailurePolicyBuilder<___State>
where ___State: Unpin,

§

impl<___State> UnsafeUnpin for ConsecutiveFailurePolicyBuilder<___State>
where ___State: UnsafeUnpin,

§

impl<___State> UnwindSafe for ConsecutiveFailurePolicyBuilder<___State>
where ___State: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V