Package-level declarations
Types
Link copied to clipboard
Link copied to clipboard
Represents the events that can be dispatched to the CircuitBreaker state machine reducer.
Link copied to clipboard
internal class CircuitBreakerStateReducer<T>(val slidingWindow: FailureRateSlidingWindow<T>, val config: CircuitBreakerConfig, val events: MutableSharedFlow<CircuitBreakerEvent>) : Reducer<CircuitBreakerState, CircuitBreakerReducerEvent, CircuitBreakerReducerEffect>
A thread-safe state machine that acts as a reducer for a CircuitBreaker. Using the dispatch method, events can be dispatched to the state machine to trigger state transitions. The current state can be consulted using the currentState method.