pub struct CircuitBreakerHandle { /* private fields */ }Expand description
The application’s view of the circuit breaker, and the only way a ceased flow restarts.
Implementations§
Source§impl CircuitBreakerHandle
impl CircuitBreakerHandle
Sourcepub fn new() -> Self
pub fn new() -> Self
A handle with no interceptor yet: CircuitBreakerBuilder::build_with_handle builds
the one it watches.
Sourcepub fn state(&self, ssrc: u32) -> Option<CircuitBreakerState>
pub fn state(&self, ssrc: u32) -> Option<CircuitBreakerState>
What the breaker is doing with the flow sent on ssrc, if it is bound.
Sourcepub fn ceased(&self) -> Vec<(u32, CircuitBreakerReason)>
pub fn ceased(&self) -> Vec<(u32, CircuitBreakerReason)>
The flows that have ceased transmission, with the breaker that stopped each.
Sourcepub fn rate_limit(&self) -> Option<f64>
pub fn rate_limit(&self) -> Option<f64>
The lowest rate any flow has been asked to stay under after the congestion breaker tripped, in bits per second. A congestion controller takes it as an upper bound.
Sourcepub fn report_round_trip_time(&self, round_trip_time: Duration)
pub fn report_round_trip_time(&self, round_trip_time: Duration)
A round trip time measured from congestion-control feedback, for the breaker to use when it cannot measure one itself.
Tr is the RFC 3550 round trip time: a report block’s LSR and DLSR against the instant the named sender report left. The breaker only knows that instant for sender reports that pass it on the way out; when the RTCP session sits wire-ward of it (as the standard set places it) none does, and without Tr the congestion breaker could never compare the flow with TCP. The congestion controller’s feedback gives the same quantity many times a second.
Sourcepub fn restart(&self, ssrc: u32, now: Instant) -> bool
pub fn restart(&self, ssrc: u32, now: Instant) -> bool
Restart a ceased flow. Returns whether it restarted.
A flow is not restarted automatically (section 4.5): this is the application saying the congestion can be expected to have gone. It is refused until the interval that tripped the breaker has passed again, so the reaction to a tripped breaker lasts at least that long however often a restart is attempted.