pub struct SyncEngineCircuit {
pub writes: CircuitBreaker,
pub reads: CircuitBreaker,
}Expand description
Circuit breaker specifically for sync-engine operations.
This wraps sync-engine calls (submit, delete, is_current) with circuit breaker protection to prevent hammering an overloaded service.
Fields§
§writes: CircuitBreakerCircuit for write operations (submit, delete)
reads: CircuitBreakerCircuit for read operations (is_current, get)
Implementations§
Source§impl SyncEngineCircuit
impl SyncEngineCircuit
Sourcepub fn with_configs(
writes_config: CircuitConfig,
reads_config: CircuitConfig,
) -> Self
pub fn with_configs( writes_config: CircuitConfig, reads_config: CircuitConfig, ) -> Self
Create with custom configs.
Sourcepub fn metrics(&self) -> SyncEngineCircuitMetrics
pub fn metrics(&self) -> SyncEngineCircuitMetrics
Get aggregated metrics.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for SyncEngineCircuit
impl !RefUnwindSafe for SyncEngineCircuit
impl Send for SyncEngineCircuit
impl Sync for SyncEngineCircuit
impl Unpin for SyncEngineCircuit
impl !UnwindSafe for SyncEngineCircuit
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more