EventCircuitBreaker class

Circuit breaker for event handlers.

Tracks failures per handler and opens the circuit when failures exceed the threshold, preventing cascading failures.

Constructors

EventCircuitBreaker({int failureThreshold = 5, Duration resetTimeout = const Duration(minutes: 1)})

Properties

failureThreshold → int
Number of failures before opening circuit.
final
hashCode → int
The hash code for this object.
no setterinherited
resetTimeout → Duration
Duration before attempting to close circuit.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

canExecute(String handlerName) → bool
Check if handler can execute.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
recordFailure(String handlerName) → void
Record failure for a handler.
recordSuccess(String handlerName) → void
Record success for a handler.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited