Class: Orchestration::Services::RabbitMQ::Healthcheck
- Inherits:
-
Object
- Object
- Orchestration::Services::RabbitMQ::Healthcheck
show all
- Includes:
- HealthcheckBase
- Defined in:
- lib/orchestration/services/rabbitmq/healthcheck.rb
Instance Attribute Summary
#configuration
Instance Method Summary
collapse
included, #initialize, #service_name
Instance Method Details
#connect ⇒ Object
19
20
21
22
23
24
25
|
# File 'lib/orchestration/services/rabbitmq/healthcheck.rb', line 19
def connect
host = @configuration.host
port = @configuration.port
connection = Bunny.new("amqp://#{host}:#{port}", log_file: devnull)
connection.start
connection.stop
end
|
#connection_errors ⇒ Object
11
12
13
14
15
16
17
|
# File 'lib/orchestration/services/rabbitmq/healthcheck.rb', line 11
def connection_errors
[
Bunny::TCPConnectionFailedForAllHosts,
AMQ::Protocol::EmptyResponseError,
Errno::ECONNRESET
]
end
|