Class: Kubernetes::HealthController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- Kubernetes::HealthController
- Defined in:
- app/controllers/kubernetes/health_controller.rb
Instance Method Summary collapse
Instance Method Details
#liveness ⇒ Object
3 4 5 6 7 |
# File 'app/controllers/kubernetes/health_controller.rb', line 3 def liveness i_am_live = Kubernetes::Health::Config.live_if.arity == 0 ? Kubernetes::Health::Config.live_if.call : Kubernetes::Health::Config.live_if.call(params) return head 200 if i_am_live head 503 end |
#readiness ⇒ Object
9 10 11 12 13 |
# File 'app/controllers/kubernetes/health_controller.rb', line 9 def readiness i_am_ready = Kubernetes::Health::Config.ready_if.arity == 0 ? Kubernetes::Health::Config.ready_if.call : Kubernetes::Health::Config.ready_if.call(params) return head 200 if i_am_ready head 503 end |