Module: Roda::RodaPlugins::Heartbeat
- Defined in:
- lib/roda/plugins/heartbeat.rb
Overview
The heartbeat handles heartbeat/status requests. If a request for the heartbeat path comes in, a 200 response with a text/plain Content-Type and a body of “OK” will be returned. The default heartbeat path is “/heartbeat”, so to use that:
plugin :heartbeat
You can also specify a custom heartbeat path:
plugin :heartbeat, path: '/status'
Defined Under Namespace
Modules: InstanceMethods
Class Method Summary collapse
-
.configure(app, opts = OPTS) ⇒ Object
Set the heartbeat path to the given path.
Class Method Details
.configure(app, opts = OPTS) ⇒ Object
Set the heartbeat path to the given path.
18 19 20 |
# File 'lib/roda/plugins/heartbeat.rb', line 18 def self.configure(app, opts=OPTS) app.opts[:heartbeat_path] = (opts[:path] || app.opts[:heartbeat_path] || "/heartbeat").dup.freeze end |