Class: Kubernetes::Health::RackOnRake
- Inherits:
-
Object
- Object
- Kubernetes::Health::RackOnRake
- Defined in:
- lib/kubernetes/health/rack_on_rake.rb
Instance Method Summary collapse
Instance Method Details
#call(env) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/kubernetes/health/rack_on_rake.rb', line 4 def call(env) req = ::Rack::Request.new(env) case req.path_info when Kubernetes::Health::Config.route_readiness http_code = 503 when Kubernetes::Health::Config.route_liveness http_code = 200 else http_code = 404 end ::Kubernetes::Health::Config.request_log_callback.call(req, http_code, '') [http_code, {}, []] end |