Sha256: da084a3de9de61fe47abac8bea2c1a305a2bceabe606a583a693c9e72df34606

Contents?: true

Size: 697 Bytes

Versions: 3

Compression:

Stored size: 697 Bytes

Contents

# frozen_string_literal: true

require "freno/client"

module Freno
  class Throttler
    # Any throttler-related error.
    class Error < Freno::Error; end

    # Raised if the throttler has waited too long for replication delay
    # to catch up.
    class WaitedTooLong < Error
      def initialize(waited_seconds: DEFAULT_WAIT_SECONDS, max_wait_seconds: DEFAULT_MAX_WAIT_SECONDS)
        super("Waited #{waited_seconds} seconds. Max allowed was #{max_wait_seconds} seconds")
      end
    end

    # Raised if the circuit breaker is open and didn't allow latest request
    class CircuitOpen < Error; end

    # Raised if the freno client errored.
    class ClientError < Error; end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
freno-client-0.9.0 lib/freno/throttler/errors.rb
freno-client-0.8.3 lib/freno/throttler/errors.rb
freno-client-0.8.2 lib/freno/throttler/errors.rb