Module: HttpHealthCheck::Probe
- Included in:
- HttpHealthCheck::Probes::DelayedJob, HttpHealthCheck::Probes::RubyKafka, HttpHealthCheck::Probes::Sidekiq
- Defined in:
- lib/http_health_check/probe.rb,
lib/http_health_check/probe/result.rb
Defined Under Namespace
Classes: Result
Instance Method Summary collapse
- #call(env) ⇒ Object
- #meta ⇒ Object
- #probe_error(extra_meta = {}) ⇒ Object
- #probe_ok(extra_meta = {}) ⇒ Object
- #with_error_handler ⇒ Object
Instance Method Details
#call(env) ⇒ Object
7 8 9 |
# File 'lib/http_health_check/probe.rb', line 7 def call(env) with_error_handler { probe(env) } end |
#meta ⇒ Object
11 12 13 |
# File 'lib/http_health_check/probe.rb', line 11 def {} end |
#probe_error(extra_meta = {}) ⇒ Object
19 20 21 |
# File 'lib/http_health_check/probe.rb', line 19 def probe_error( = {}) Result.error(.merge()) end |
#probe_ok(extra_meta = {}) ⇒ Object
15 16 17 |
# File 'lib/http_health_check/probe.rb', line 15 def probe_ok( = {}) Result.ok(.merge()) end |
#with_error_handler ⇒ Object
23 24 25 26 27 |
# File 'lib/http_health_check/probe.rb', line 23 def with_error_handler yield rescue StandardError => e probe_error(error_class: e.class.name, error_message: e.) end |