pub struct InMemoryCircuitBreakerBackend { /* private fields */ }Expand description
In-process circuit breaker backend backed by a Mutex.
Implementations§
Trait Implementations§
Source§impl CircuitBreakerBackend for InMemoryCircuitBreakerBackend
impl CircuitBreakerBackend for InMemoryCircuitBreakerBackend
Source§fn increment_failures(&self, _service: &str) -> u32
fn increment_failures(&self, _service: &str) -> u32
Increment the consecutive failure count for
service and return the new count.Source§fn reset_failures(&self, _service: &str)
fn reset_failures(&self, _service: &str)
Reset the consecutive failure count for
service to zero.Source§fn get_failures(&self, _service: &str) -> u32
fn get_failures(&self, _service: &str) -> u32
Return the current consecutive failure count for
service.Source§fn set_open_at(&self, _service: &str, at: Instant)
fn set_open_at(&self, _service: &str, at: Instant)
Record the instant at which the circuit was opened for
service.Source§fn clear_open_at(&self, _service: &str)
fn clear_open_at(&self, _service: &str)
Clear the open-at timestamp, effectively moving the circuit to Closed or HalfOpen.
Auto Trait Implementations§
impl Freeze for InMemoryCircuitBreakerBackend
impl RefUnwindSafe for InMemoryCircuitBreakerBackend
impl Send for InMemoryCircuitBreakerBackend
impl Sync for InMemoryCircuitBreakerBackend
impl Unpin for InMemoryCircuitBreakerBackend
impl UnsafeUnpin for InMemoryCircuitBreakerBackend
impl UnwindSafe for InMemoryCircuitBreakerBackend
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