Sha256: 02c430c5ecb50c3fed1e82176d4b3f5348f49dc866f814c383666614b4422d61

Contents?: true

Size: 439 Bytes

Versions: 3

Compression:

Stored size: 439 Bytes

Contents

# frozen_string_literal: true

require 'hey_doctor/version'
require 'hey_doctor/engine'

module HeyDoctor::Rack
  class HealthCheck
    def call(_env)
      [200, {}, [status]]
    end

    private

    def status
      {
        app: ::HeyDoctor::CheckApplicationHealthService.call,
        database: ::HeyDoctor::CheckDatabaseHealthService.call,
        redis: ::HeyDoctor::CheckRedisHealthService.call
      }.to_json
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hey_doctor-1.1.1 lib/hey_doctor.rb
hey_doctor-1.1.0 lib/hey_doctor.rb
hey_doctor-1.0.0 lib/hey_doctor.rb