pub struct HealthTracker { /* private fields */ }Expand description
Tracks the health of a model/profile combination.
Implementations§
Source§impl HealthTracker
impl HealthTracker
pub fn new(circuit_break_secs: u64) -> Self
Sourcepub fn record_success(&self)
pub fn record_success(&self)
Record a successful request.
Sourcepub fn record_failure(&self)
pub fn record_failure(&self)
Record a failed request.
Sourcepub fn is_circuit_open(&self) -> bool
pub fn is_circuit_open(&self) -> bool
Check if the circuit is open (should not send requests).
Sourcepub fn stats(&self) -> HealthStats
pub fn stats(&self) -> HealthStats
Get health statistics.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for HealthTracker
impl RefUnwindSafe for HealthTracker
impl Send for HealthTracker
impl Sync for HealthTracker
impl Unpin for HealthTracker
impl UnsafeUnpin for HealthTracker
impl UnwindSafe for HealthTracker
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