Class: HTTPigeon::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/httpigeon/configuration.rb', line 23

def initialize
  @default_event_type = 'http.outbound'
  @default_filter_keys = []
  @redactor_string = '[FILTERED]'
  @log_redactor = nil
  @event_logger = nil
  @auto_generate_request_id = true
  @notify_all_exceptions = false
  @exception_notifier = nil
  @mount_circuit_breaker = false
  @log_circuit_events = true

  @fuse_error_codes_watchlist = []
  @fuse_on_circuit_opened = ->(*_args) {}
  @fuse_on_circuit_closed = ->(*_args) {}
  @fuse_open_circuit_handler = nil
  @fuse_max_failures_count = 10
  @fuse_min_failures_count = 5
  @fuse_failure_rate_threshold = 0.5
  @fuse_sample_window = 60
  @fuse_open_circuit_sleep_window = 30
end

Instance Attribute Details

#auto_generate_request_idObject

Returns the value of attribute auto_generate_request_id.



3
4
5
# File 'lib/httpigeon/configuration.rb', line 3

def auto_generate_request_id
  @auto_generate_request_id
end

#default_event_typeObject

Returns the value of attribute default_event_type.



3
4
5
# File 'lib/httpigeon/configuration.rb', line 3

def default_event_type
  @default_event_type
end

#default_filter_keysObject

Returns the value of attribute default_filter_keys.



3
4
5
# File 'lib/httpigeon/configuration.rb', line 3

def default_filter_keys
  @default_filter_keys
end

#event_loggerObject

Returns the value of attribute event_logger.



3
4
5
# File 'lib/httpigeon/configuration.rb', line 3

def event_logger
  @event_logger
end

#exception_notifierObject

Returns the value of attribute exception_notifier.



3
4
5
# File 'lib/httpigeon/configuration.rb', line 3

def exception_notifier
  @exception_notifier
end

#fuse_error_codes_watchlistObject

Returns the value of attribute fuse_error_codes_watchlist.



3
4
5
# File 'lib/httpigeon/configuration.rb', line 3

def fuse_error_codes_watchlist
  @fuse_error_codes_watchlist
end

#fuse_failure_rate_thresholdObject

Returns the value of attribute fuse_failure_rate_threshold.



3
4
5
# File 'lib/httpigeon/configuration.rb', line 3

def fuse_failure_rate_threshold
  @fuse_failure_rate_threshold
end

#fuse_max_failures_countObject

Returns the value of attribute fuse_max_failures_count.



3
4
5
# File 'lib/httpigeon/configuration.rb', line 3

def fuse_max_failures_count
  @fuse_max_failures_count
end

#fuse_min_failures_countObject

Returns the value of attribute fuse_min_failures_count.



3
4
5
# File 'lib/httpigeon/configuration.rb', line 3

def fuse_min_failures_count
  @fuse_min_failures_count
end

#fuse_on_circuit_closedObject

Returns the value of attribute fuse_on_circuit_closed.



3
4
5
# File 'lib/httpigeon/configuration.rb', line 3

def fuse_on_circuit_closed
  @fuse_on_circuit_closed
end

#fuse_on_circuit_openedObject

Returns the value of attribute fuse_on_circuit_opened.



3
4
5
# File 'lib/httpigeon/configuration.rb', line 3

def fuse_on_circuit_opened
  @fuse_on_circuit_opened
end

#fuse_open_circuit_handlerObject

Returns the value of attribute fuse_open_circuit_handler.



3
4
5
# File 'lib/httpigeon/configuration.rb', line 3

def fuse_open_circuit_handler
  @fuse_open_circuit_handler
end

#fuse_open_circuit_sleep_windowObject

Returns the value of attribute fuse_open_circuit_sleep_window.



3
4
5
# File 'lib/httpigeon/configuration.rb', line 3

def fuse_open_circuit_sleep_window
  @fuse_open_circuit_sleep_window
end

#fuse_sample_windowObject

Returns the value of attribute fuse_sample_window.



3
4
5
# File 'lib/httpigeon/configuration.rb', line 3

def fuse_sample_window
  @fuse_sample_window
end

#log_circuit_eventsObject

Returns the value of attribute log_circuit_events.



3
4
5
# File 'lib/httpigeon/configuration.rb', line 3

def log_circuit_events
  @log_circuit_events
end

#log_redactorObject

Returns the value of attribute log_redactor.



3
4
5
# File 'lib/httpigeon/configuration.rb', line 3

def log_redactor
  @log_redactor
end

#mount_circuit_breakerObject

Returns the value of attribute mount_circuit_breaker.



3
4
5
# File 'lib/httpigeon/configuration.rb', line 3

def mount_circuit_breaker
  @mount_circuit_breaker
end

#notify_all_exceptionsObject

Returns the value of attribute notify_all_exceptions.



3
4
5
# File 'lib/httpigeon/configuration.rb', line 3

def notify_all_exceptions
  @notify_all_exceptions
end

#redactor_stringObject

Returns the value of attribute redactor_string.



3
4
5
# File 'lib/httpigeon/configuration.rb', line 3

def redactor_string
  @redactor_string
end