Sha256: 578600f0c8887c65ae681b7e035c890eeb7b9b3d29b8cffe9252103b7ea7b4d0

Contents?: true

Size: 637 Bytes

Versions: 68

Compression:

Stored size: 637 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
          host = @configuration.host
          port = @configuration.port
          connection = Bunny.new("amqp://#{host}:#{port}", log_file: devnull)
          connection.start
          connection.stop
        end
      end
    end
  end
end

Version data entries

68 entries across 68 versions & 1 rubygems

Version Path
orchestration-0.7.15 lib/orchestration/services/rabbitmq/healthcheck.rb
orchestration-0.6.16 lib/orchestration/services/rabbitmq/healthcheck.rb
orchestration-0.7.14 lib/orchestration/services/rabbitmq/healthcheck.rb
orchestration-0.7.13 lib/orchestration/services/rabbitmq/healthcheck.rb
orchestration-0.6.15 lib/orchestration/services/rabbitmq/healthcheck.rb
orchestration-0.7.12 lib/orchestration/services/rabbitmq/healthcheck.rb
orchestration-0.6.14 lib/orchestration/services/rabbitmq/healthcheck.rb
orchestration-0.7.11 lib/orchestration/services/rabbitmq/healthcheck.rb
orchestration-0.6.13 lib/orchestration/services/rabbitmq/healthcheck.rb
orchestration-0.7.10 lib/orchestration/services/rabbitmq/healthcheck.rb
orchestration-0.7.9 lib/orchestration/services/rabbitmq/healthcheck.rb
orchestration-0.6.12 lib/orchestration/services/rabbitmq/healthcheck.rb
orchestration-0.7.8 lib/orchestration/services/rabbitmq/healthcheck.rb
orchestration-0.6.11 lib/orchestration/services/rabbitmq/healthcheck.rb
orchestration-0.7.6 lib/orchestration/services/rabbitmq/healthcheck.rb
orchestration-0.6.10 lib/orchestration/services/rabbitmq/healthcheck.rb
orchestration-0.7.5 lib/orchestration/services/rabbitmq/healthcheck.rb
orchestration-0.7.4 lib/orchestration/services/rabbitmq/healthcheck.rb
orchestration-0.6.9 lib/orchestration/services/rabbitmq/healthcheck.rb
orchestration-0.6.8 lib/orchestration/services/rabbitmq/healthcheck.rb