pub struct TargetHealthMonitor { /* private fields */ }Expand description
Target health monitor with exponential backoff.
Implementations§
Source§impl TargetHealthMonitor
impl TargetHealthMonitor
pub fn new() -> Self
Sourcepub fn record_error(&mut self)
pub fn record_error(&mut self)
Record a target error.
Sourcepub fn record_success(&mut self)
pub fn record_success(&mut self)
Record a successful request.
Sourcepub fn is_healthy(&self) -> bool
pub fn is_healthy(&self) -> bool
Check if the target is considered healthy.
Sourcepub fn in_backoff(&self) -> bool
pub fn in_backoff(&self) -> bool
Whether we are currently in an active backoff period.
Trait Implementations§
Source§impl Clone for TargetHealthMonitor
impl Clone for TargetHealthMonitor
Source§fn clone(&self) -> TargetHealthMonitor
fn clone(&self) -> TargetHealthMonitor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 TargetHealthMonitor
impl Debug for TargetHealthMonitor
Auto Trait Implementations§
impl Freeze for TargetHealthMonitor
impl RefUnwindSafe for TargetHealthMonitor
impl Send for TargetHealthMonitor
impl Sync for TargetHealthMonitor
impl Unpin for TargetHealthMonitor
impl UnsafeUnpin for TargetHealthMonitor
impl UnwindSafe for TargetHealthMonitor
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