Class: AgentHarness::CircuitBreakerConfig
- Inherits:
-
Object
- Object
- AgentHarness::CircuitBreakerConfig
- Defined in:
- lib/agent_harness/configuration.rb
Overview
Circuit breaker configuration
Instance Attribute Summary collapse
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#failure_threshold ⇒ Object
Returns the value of attribute failure_threshold.
-
#half_open_max_calls ⇒ Object
Returns the value of attribute half_open_max_calls.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
Instance Method Summary collapse
-
#initialize ⇒ CircuitBreakerConfig
constructor
A new instance of CircuitBreakerConfig.
Constructor Details
#initialize ⇒ CircuitBreakerConfig
Returns a new instance of CircuitBreakerConfig.
190 191 192 193 194 195 |
# File 'lib/agent_harness/configuration.rb', line 190 def initialize @enabled = true @failure_threshold = 5 @timeout = 300 # 5 minutes @half_open_max_calls = 3 end |
Instance Attribute Details
#enabled ⇒ Object
Returns the value of attribute enabled.
188 189 190 |
# File 'lib/agent_harness/configuration.rb', line 188 def enabled @enabled end |
#failure_threshold ⇒ Object
Returns the value of attribute failure_threshold.
188 189 190 |
# File 'lib/agent_harness/configuration.rb', line 188 def failure_threshold @failure_threshold end |
#half_open_max_calls ⇒ Object
Returns the value of attribute half_open_max_calls.
188 189 190 |
# File 'lib/agent_harness/configuration.rb', line 188 def half_open_max_calls @half_open_max_calls end |
#timeout ⇒ Object
Returns the value of attribute timeout.
188 189 190 |
# File 'lib/agent_harness/configuration.rb', line 188 def timeout @timeout end |