Class: StatusCheck::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/status_check/configuration.rb

Constant Summary collapse

AVAILABLE_SERVICES =
I{postgresql redis}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



7
8
9
# File 'lib/status_check/configuration.rb', line 7

def initialize
  @checks = {}
end

Instance Attribute Details

#checksObject

Returns the value of attribute checks.



3
4
5
# File 'lib/status_check/configuration.rb', line 3

def checks
  @checks
end

Instance Method Details

#check(service_name, service:, connection:) ⇒ Object



11
12
13
14
15
# File 'lib/status_check/configuration.rb', line 11

def check(service_name, service:, connection:)
  service = setup_service(service, connection)
  validate_service(service)
  @checks[service_name] = service
end