Class: BreakerMachines::Configuration

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

Overview

Global configuration class for BreakerMachines

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



35
36
37
38
39
40
41
42
# File 'lib/breaker_machines.rb', line 35

def initialize
  @default_storage = :bucket_memory
  @default_timeout = nil
  @default_reset_timeout = 60.seconds
  @default_failure_threshold = 5
  @log_events = true
  @fiber_safe = false
end

Instance Attribute Details

#default_failure_thresholdObject

Returns the value of attribute default_failure_threshold.



28
29
30
# File 'lib/breaker_machines.rb', line 28

def default_failure_threshold
  @default_failure_threshold
end

#default_reset_timeoutObject

Returns the value of attribute default_reset_timeout.



28
29
30
# File 'lib/breaker_machines.rb', line 28

def default_reset_timeout
  @default_reset_timeout
end

#default_storageObject

Returns the value of attribute default_storage.



28
29
30
# File 'lib/breaker_machines.rb', line 28

def default_storage
  @default_storage
end

#default_timeoutObject

Returns the value of attribute default_timeout.



28
29
30
# File 'lib/breaker_machines.rb', line 28

def default_timeout
  @default_timeout
end

#fiber_safeObject

Returns the value of attribute fiber_safe.



28
29
30
# File 'lib/breaker_machines.rb', line 28

def fiber_safe
  @fiber_safe
end

#log_eventsObject

Returns the value of attribute log_events.



28
29
30
# File 'lib/breaker_machines.rb', line 28

def log_events
  @log_events
end