Sha256: 4c73d4bbbd04c8b3cc5bf7922e8b09b0182046baa60e46885f1b116783931ca9
Contents?: true
Size: 530 Bytes
Versions: 7
Compression:
Stored size: 530 Bytes
Contents
# frozen_string_literal: true require_relative 'probe/result' module HttpHealthCheck module Probe def call(env) with_error_handler { probe(env) } end def meta {} end def probe_ok(extra_meta = {}) Result.ok(meta.merge(extra_meta)) end def probe_error(extra_meta = {}) Result.error(meta.merge(extra_meta)) end def with_error_handler yield rescue StandardError => e probe_error(error_class: e.class.name, error_message: e.message) end end end
Version data entries
7 entries across 7 versions & 1 rubygems