Module: Cyclid::API::Health::Helpers

Included in:
Plugins::Local
Defined in:
app/cyclid/health_helpers.rb

Overview

Helper methods to isolate the plugins from the implementation details of the healthcheck framework

Constant Summary collapse

STATUSES =

Health statuses

{
  ok: SinatraHealthCheck::Status::SEVERITIES[:ok],
  warning: SinatraHealthCheck::Status::SEVERITIES[:warning],
  error: SinatraHealthCheck::Status::SEVERITIES[:error]
}.freeze

Instance Method Summary collapse

Instance Method Details

#health_status(status, message) ⇒ Object

Produce a SinatraHealthCheck object from the given status & message



34
35
36
# File 'app/cyclid/health_helpers.rb', line 34

def health_status(status, message)
  SinatraHealthCheck::Status.new(status, message)
end