async/circuit_breaker_utils library
Circuit breaker (closed / open-with-timeout) — roadmap #657.
NOTE: this is a two-state breaker, not a gated three-state one. After
CircuitBreakerUtils.resetTimeout elapses, canAttempt returns true for
EVERY caller (there is no single-probe half-open gating), and the circuit
only closes when a caller reports recordSuccess. Treat the post-timeout
window as "retries allowed", not "exactly one probe in flight".
Classes
- CircuitBreakerUtils
- Simple circuit breaker: after failureThreshold failures, open for resetTimeout.
Constants
- circuitBreakerDefaultResetTimeout → const Duration
- Default duration the circuit stays open before retries are allowed again. Audited: 2026-06-12 11:26 EDT