Class: UAE::Healthz
- Inherits:
-
Object
- Object
- UAE::Healthz
- Defined in:
- lib/uae/component.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(logger) ⇒ Healthz
constructor
A new instance of Healthz.
Constructor Details
#initialize(logger) ⇒ Healthz
Returns a new instance of Healthz.
30 31 32 |
# File 'lib/uae/component.rb', line 30 def initialize(logger) @logger = logger end |
Instance Method Details
#call(env) ⇒ Object
34 35 36 37 38 39 40 41 |
# File 'lib/uae/component.rb', line 34 def call(env) @logger.debug "healthz access" healthz = Component.updated_healthz [200, { 'Content-Type' => 'application/json', 'Content-Length' => healthz.length.to_s }, healthz] rescue => e @logger.error "healthz error #{e.inspect} #{e.backtrace.join("\n")}" raise e end |