module HTTPX::Plugins::CircuitBreaker

  1. lib/httpx/plugins/circuit_breaker.rb
  2. lib/httpx/plugins/circuit_breaker/circuit.rb
  3. lib/httpx/plugins/circuit_breaker/circuit_store.rb
  4. show all

This plugin implements a circuit breaker around connection errors.

gitlab.com/os85/httpx/wikis/Circuit-Breaker

Methods

Public Class

  1. extra_options
  2. load_dependencies

Public Class methods

extra_options(options)
[show source]
   # File lib/httpx/plugins/circuit_breaker.rb
18 def self.extra_options(options)
19   options.merge(
20     circuit_breaker_max_attempts: 3,
21     circuit_breaker_reset_attempts_in: 60,
22     circuit_breaker_break_in: 60,
23     circuit_breaker_half_open_drip_rate: 1
24   )
25 end
load_dependencies(*)
[show source]
   # File lib/httpx/plugins/circuit_breaker.rb
13 def self.load_dependencies(*)
14   require_relative "circuit_breaker/circuit"
15   require_relative "circuit_breaker/circuit_store"
16 end