Class: Eipiai::HealthCheck
- Inherits:
-
Object
- Object
- Eipiai::HealthCheck
- Defined in:
- lib/eipiai/resources/health.rb
Overview
HealthCheck
Class with a ‘#healthy?` method. If this method returns `true`, the service is expected to be available and ready to serve requests.
Instance Method Summary collapse
-
#healthy? ⇒ true, false
healthy?.
-
#to_h ⇒ Hash
to_h.
Instance Method Details
#healthy? ⇒ true, false
healthy?
Can be overwritten with custom logic to determine health status.
20 21 22 |
# File 'lib/eipiai/resources/health.rb', line 20 def healthy? Eipiai.configuration.healthy == true end |
#to_h ⇒ Hash
to_h
Hash representation of the health status.
30 31 32 |
# File 'lib/eipiai/resources/health.rb', line 30 def to_h { 'healthy' => healthy? } end |