class RedisClient::CircuitBreaker

def initialize(error_threshold:, error_timeout:, error_threshold_timeout: error_timeout, success_threshold: 0)

def initialize(error_threshold:, error_timeout:, error_threshold_timeout: error_timeout, success_threshold: 0)
  @error_threshold = Integer(error_threshold)
  @error_threshold_timeout = Float(error_threshold_timeout)
  @error_timeout = Float(error_timeout)
  @success_threshold = Integer(success_threshold)
  @errors = []
  @successes = 0
  @state = :closed
  @lock = Mutex.new
end