Common System 0.2.0
Common interfaces and patterns for system integration
Loading...
Searching...
No Matches
circuit_state.h File Reference

Circuit breaker state machine states. More...

#include <string>
Include dependency graph for circuit_state.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  kcenon
 
namespace  kcenon::common
 Core interfaces.
 
namespace  kcenon::common::resilience
 

Enumerations

enum class  kcenon::common::resilience::circuit_state { kcenon::common::resilience::CLOSED , kcenon::common::resilience::OPEN , kcenon::common::resilience::HALF_OPEN }
 Represents the current state of a circuit breaker. More...
 

Functions

auto kcenon::common::resilience::to_string (circuit_state state) -> std::string
 Convert circuit state to human-readable string.
 

Detailed Description

Circuit breaker state machine states.

Defines the three states of a circuit breaker:

  • CLOSED: Normal operation, requests are allowed
  • OPEN: Failure threshold exceeded, requests are blocked
  • HALF_OPEN: Testing recovery, limited requests allowed

Definition in file circuit_state.h.