Sha256: a568b7d6b941a5678eb5931c29f96ef2624fe0a60fccbe2cb4354428301d8a52

Contents?: true

Size: 609 Bytes

Versions: 14

Compression:

Stored size: 609 Bytes

Contents

# frozen_string_literal: true

module Orchestration
  module Services
    module RabbitMQ
      class Healthcheck
        include HealthcheckBase

        dependencies 'bunny'

        def connection_errors
          [
            Bunny::TCPConnectionFailedForAllHosts,
            AMQ::Protocol::EmptyResponseError,
            Errno::ECONNRESET
          ]
        end

        def connect
          port = @configuration.local_port

          connection = Bunny.new("amqp://localhost:#{port}", log_file: devnull)
          connection.start
          connection.stop
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
orchestration-0.3.15 lib/orchestration/services/rabbitmq/healthcheck.rb
orchestration-0.3.14 lib/orchestration/services/rabbitmq/healthcheck.rb
orchestration-0.3.13 lib/orchestration/services/rabbitmq/healthcheck.rb
orchestration-0.3.12 lib/orchestration/services/rabbitmq/healthcheck.rb
orchestration-0.3.11 lib/orchestration/services/rabbitmq/healthcheck.rb
orchestration-0.3.10 lib/orchestration/services/rabbitmq/healthcheck.rb
orchestration-0.3.9 lib/orchestration/services/rabbitmq/healthcheck.rb
orchestration-0.3.8 lib/orchestration/services/rabbitmq/healthcheck.rb
orchestration-0.3.7 lib/orchestration/services/rabbitmq/healthcheck.rb
orchestration-0.3.6 lib/orchestration/services/rabbitmq/healthcheck.rb
orchestration-0.3.5 lib/orchestration/services/rabbitmq/healthcheck.rb
orchestration-0.3.4 lib/orchestration/services/rabbitmq/healthcheck.rb
orchestration-0.3.3 lib/orchestration/services/rabbitmq/healthcheck.rb
orchestration-0.3.2 lib/orchestration/services/rabbitmq/healthcheck.rb