Class: StatusCheck::Configuration
- Inherits:
-
Object
- Object
- StatusCheck::Configuration
- Defined in:
- lib/status_check/configuration.rb
Constant Summary collapse
- AVAILABLE_SERVICES =
I{postgresql redis}
Instance Attribute Summary collapse
-
#checks ⇒ Object
Returns the value of attribute checks.
Instance Method Summary collapse
- #check(service_name, service:, connection:) ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
7 8 9 |
# File 'lib/status_check/configuration.rb', line 7 def initialize @checks = {} end |
Instance Attribute Details
#checks ⇒ Object
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 |