|
Common System 0.2.0
Common interfaces and patterns for system integration
|
Classes | |
| class | circuit_breaker |
| Thread-safe circuit breaker for fault tolerance. More... | |
| struct | circuit_breaker_config |
| Configuration parameters for circuit breaker. More... | |
| class | failure_window |
| Thread-safe sliding window for failure tracking. More... | |
Enumerations | |
| enum class | circuit_state { CLOSED , OPEN , HALF_OPEN } |
| Represents the current state of a circuit breaker. More... | |
Functions | |
| auto | to_string (circuit_state state) -> std::string |
| Convert circuit state to human-readable string. | |
|
strong |
Represents the current state of a circuit breaker.
State Transitions: CLOSED -> OPEN: When failure threshold is exceeded OPEN -> HALF_OPEN: After timeout period expires HALF_OPEN -> CLOSED: When success threshold is met HALF_OPEN -> OPEN: When any failure occurs during testing
Definition at line 31 of file circuit_state.h.
|
inline |
Convert circuit state to human-readable string.
| state | Circuit state to convert |
Definition at line 57 of file circuit_state.h.
References CLOSED, HALF_OPEN, and OPEN.
Referenced by kcenon::common::resilience::circuit_breaker::get_stats().
