Class: Norikra::RPC::Gatekeeper
- Inherits:
-
Object
- Object
- Norikra::RPC::Gatekeeper
- Defined in:
- lib/norikra/rpc/gatekeeper.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ Gatekeeper
constructor
handler of “GET /” to respond for monitor tools.
Constructor Details
#initialize(app) ⇒ Gatekeeper
handler of “GET /” to respond for monitor tools
8 9 10 |
# File 'lib/norikra/rpc/gatekeeper.rb', line 8 def initialize(app) @app = app end |
Instance Method Details
#call(env) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/norikra/rpc/gatekeeper.rb', line 12 def call(env) if env["REQUEST_METHOD"] == 'GET' && env["PATH_INFO"] == '/' return [ 200, {'Content-Type' => 'text/plain'}, ['Norikra alive!'] ] end return @app.call(env) end |