CircuitBreakerStateReducer
constructor(slidingWindow: FailureRateSlidingWindow<T>, config: CircuitBreakerConfig, events: MutableSharedFlow<CircuitBreakerEvent>)(source)
Parameters
slidingWindow
the sliding window used to record the result (success or failure) of operations and calculate the failure rate.
config
the configuration of the circuit breaker.
events
the shared flow to emit circuit breaker events to.