Module: Health
- Defined in:
- lib/health.rb,
lib/health/checks.rb,
lib/health/checker.rb,
lib/health/version.rb,
lib/health/endpoint.rb,
lib/health/checks/rollout.rb
Defined Under Namespace
Modules: Checks
Classes: Checker, Endpoint
Constant Summary
collapse
- VERSION =
"0.0.4"
Class Method Summary
collapse
Class Method Details
.check(name_or_object, &block) ⇒ Object
15
16
17
|
# File 'lib/health.rb', line 15
def check(name_or_object, &block)
checker.check(name_or_object, &block)
end
|
.checker ⇒ Object
7
8
9
|
# File 'lib/health.rb', line 7
def checker
@checker ||= Checker.new
end
|
11
12
13
|
# File 'lib/health.rb', line 11
def configure(&block)
instance_eval(&block)
end
|
.endpoint_access_policy(&block) ⇒ Object
31
32
33
34
35
36
37
|
# File 'lib/health.rb', line 31
def endpoint_access_policy(&block)
if block_given?
@endpoint_access_policy = block
else
@endpoint_access_policy ||= proc { true }
end
end
|
.has_check?(name) ⇒ Boolean
19
20
21
|
# File 'lib/health.rb', line 19
def has_check?(name)
checker.has_check?(name)
end
|
.names ⇒ Object
27
28
29
|
# File 'lib/health.rb', line 27
def names
checker.names
end
|
23
24
25
|
# File 'lib/health.rb', line 23
def perform(name)
checker.perform(name)
end
|