Class: Sidekiq::CircuitBreaker::Configuration
- Inherits:
-
Object
- Object
- Sidekiq::CircuitBreaker::Configuration
- Defined in:
- lib/sidekiq/circuit_breaker/configuration.rb
Instance Attribute Summary collapse
-
#failure_threshold ⇒ Object
Returns the value of attribute failure_threshold.
-
#max_open_time ⇒ Object
Returns the value of attribute max_open_time.
-
#scope ⇒ Object
readonly
Returns the value of attribute scope.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #set_scope(identifier = nil) ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
9 10 11 12 |
# File 'lib/sidekiq/circuit_breaker/configuration.rb', line 9 def initialize self.failure_threshold = 7 self.max_open_time = 120 end |
Instance Attribute Details
#failure_threshold ⇒ Object
Returns the value of attribute failure_threshold.
6 7 8 |
# File 'lib/sidekiq/circuit_breaker/configuration.rb', line 6 def failure_threshold @failure_threshold end |
#max_open_time ⇒ Object
Returns the value of attribute max_open_time.
7 8 9 |
# File 'lib/sidekiq/circuit_breaker/configuration.rb', line 7 def max_open_time @max_open_time end |
#scope ⇒ Object (readonly)
Returns the value of attribute scope.
4 5 6 |
# File 'lib/sidekiq/circuit_breaker/configuration.rb', line 4 def scope @scope end |
Instance Method Details
#set_scope(identifier = nil) ⇒ Object
14 15 16 |
# File 'lib/sidekiq/circuit_breaker/configuration.rb', line 14 def set_scope(identifier = nil) @scope = identifier end |