Sha256: 5a38bb92de6e17e2a61ee08e44b0e39ddffecade780f46571b96e16dbe248b52

Contents?: true

Size: 841 Bytes

Versions: 11

Compression:

Stored size: 841 Bytes

Contents

require "govuk_app_config/govuk_healthcheck/checkup"
require "govuk_app_config/govuk_healthcheck/active_record"
require "govuk_app_config/govuk_healthcheck/mongoid"
require "govuk_app_config/govuk_healthcheck/rails_cache"
require "govuk_app_config/govuk_healthcheck/sidekiq_redis"
require "govuk_app_config/govuk_healthcheck/threshold_check"
require "govuk_app_config/govuk_healthcheck/sidekiq_queue_check"
require "govuk_app_config/govuk_healthcheck/sidekiq_queue_latency_check"
require "govuk_app_config/govuk_healthcheck/sidekiq_retry_size_check"
require "json"

module GovukHealthcheck
  def self.rack_response(*checks)
    proc do
      [
        200,
        { "Content-Type" => "application/json" },
        [JSON.dump(healthcheck(checks))],
      ]
    end
  end

  def self.healthcheck(checks)
    Checkup.new(checks).run
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
govuk_app_config-2.8.2 lib/govuk_app_config/govuk_healthcheck.rb
govuk_app_config-2.8.1 lib/govuk_app_config/govuk_healthcheck.rb
govuk_app_config-2.8.0 lib/govuk_app_config/govuk_healthcheck.rb
govuk_app_config-2.7.1 lib/govuk_app_config/govuk_healthcheck.rb
govuk_app_config-2.7.0 lib/govuk_app_config/govuk_healthcheck.rb
govuk_app_config-2.6.0 lib/govuk_app_config/govuk_healthcheck.rb
govuk_app_config-2.5.2 lib/govuk_app_config/govuk_healthcheck.rb
govuk_app_config-2.5.1 lib/govuk_app_config/govuk_healthcheck.rb
govuk_app_config-2.5.0 lib/govuk_app_config/govuk_healthcheck.rb
govuk_app_config-2.4.1 lib/govuk_app_config/govuk_healthcheck.rb
govuk_app_config-2.4.0 lib/govuk_app_config/govuk_healthcheck.rb