Class: AgentHarness::CircuitBreakerConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/agent_harness/configuration.rb

Overview

Circuit breaker configuration

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCircuitBreakerConfig

Returns a new instance of CircuitBreakerConfig.



282
283
284
285
286
287
# File 'lib/agent_harness/configuration.rb', line 282

def initialize
  @enabled = true
  @failure_threshold = 5
  @timeout = 300 # 5 minutes
  @half_open_max_calls = 3
end

Instance Attribute Details

#enabledObject

Returns the value of attribute enabled.



280
281
282
# File 'lib/agent_harness/configuration.rb', line 280

def enabled
  @enabled
end

#failure_thresholdObject

Returns the value of attribute failure_threshold.



280
281
282
# File 'lib/agent_harness/configuration.rb', line 280

def failure_threshold
  @failure_threshold
end

#half_open_max_callsObject

Returns the value of attribute half_open_max_calls.



280
281
282
# File 'lib/agent_harness/configuration.rb', line 280

def half_open_max_calls
  @half_open_max_calls
end

#timeoutObject

Returns the value of attribute timeout.



280
281
282
# File 'lib/agent_harness/configuration.rb', line 280

def timeout
  @timeout
end