Simulez un circuit breaker pour comprendre les états Fermé, Ouvert et Semi-ouvert.
State Machine:
CLOSED → 3 failures → OPEN
OPEN → 5s timeout → HALF-OPEN
HALF-OPEN → 2 successes → CLOSED
HALF-OPEN → 1 failure → OPEN
Aucun événement. Envoyez un succès ou un échec pour commencer.