Module: HTTPX::Plugins::CircuitBreaker::OptionsMethods

Defined in:
lib/httpx/plugins/circuit_breaker.rb

Overview

adds support for the following options:

:circuit_breaker_max_attempts

the number of attempts the circuit allows, before it is opened (defaults to 3).

:circuit_breaker_reset_attempts_in

the time a circuit stays open at most, before it resets (defaults to 60).

:circuit_breaker_break_on

callable defining an alternative rule for a response to break (i.e. ->(res) { res.status == 429 } )

:circuit_breaker_break_in

the time that must elapse before an open circuit can transit to the half-open state (defaults to <60).

:circuit_breaker_half_open_drip_rate

the rate of requests a circuit allows to be performed when in an half-open state (defaults to 1).