Class: Eipiai::HealthCheck

Inherits:
Object
  • Object
show all
Defined in:
lib/eipiai/webmachine/resources/health.rb

Overview

HealthCheck

Class with a single method ‘healthy?`. Returns `true` by default.

Instance Method Summary collapse

Instance Method Details

#healthy?true, false

healthy?

Can be overwritten with custom logic to determine health status.

Returns:

  • (true, false)

    health status of service



18
19
20
# File 'lib/eipiai/webmachine/resources/health.rb', line 18

def healthy?
  Eipiai.configuration.healthy == true
end

#to_hashHash

to_hash

Hash representation of the health status.

Returns:

  • (Hash)

    hash representation of health status



28
29
30
# File 'lib/eipiai/webmachine/resources/health.rb', line 28

def to_hash
  { 'healthy' => healthy? }
end