Class: Orchestration::Services::Redis::Healthcheck

Inherits:
Object
  • Object
show all
Includes:
HealthcheckBase
Defined in:
lib/orchestration/services/redis/healthcheck.rb

Defined Under Namespace

Classes: NotConnectedError

Instance Attribute Summary

Attributes included from HealthcheckBase

#configuration

Instance Method Summary collapse

Methods included from HealthcheckBase

included, #initialize, #service_name

Instance Method Details

#connectObject

Raises:



17
18
19
20
21
22
23
# File 'lib/orchestration/services/redis/healthcheck.rb', line 17

def connect
  host = @configuration.host
  port = @configuration.port
  return if ::Redis.new(url: "redis://#{host}:#{port}").connected?

  raise NotConnectedError
end

#connection_errorsObject



13
14
15
# File 'lib/orchestration/services/redis/healthcheck.rb', line 13

def connection_errors
  [NotConnectedError]
end