Class: Freno::Throttler::CircuitBreaker::Noop

Inherits:
Object
  • Object
show all
Defined in:
lib/freno/throttler/circuit_breaker.rb

Overview

The Noop circuit breaker is the ‘:circuit_breaker` used by default in the Throttler

It always allows requests, and does nothing when given ‘success` or `failure` messages. For that reason it doesn’t provide any resiliency guarantee.

See github.com/jnunemaker/resilient for a real ruby implementation of the CircuitBreaker pattern.

Class Method Summary collapse

Class Method Details

.allow_request?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/freno/throttler/circuit_breaker.rb', line 29

def self.allow_request?
  true
end

.failureObject



35
# File 'lib/freno/throttler/circuit_breaker.rb', line 35

def self.failure; end

.successObject



33
# File 'lib/freno/throttler/circuit_breaker.rb', line 33

def self.success; end