Class: Forem::Services::HealthCheckService
- Inherits:
-
BaseService
- Object
- BaseService
- Forem::Services::HealthCheckService
- Defined in:
- lib/forem/services/health_check_service.rb
Overview
Service for interacting with the Forem Health Check API.
In production these endpoints require the health-check-token
header — pass token: to each call. On localhost the token is
bypassed by Forem core, so a local development instance accepts
unauthenticated calls.
Instance Method Summary collapse
-
#app(token: nil, **opts) ⇒ Forem::ForemObject
Application-server health.
-
#cache(token: nil, **opts) ⇒ Forem::ForemObject
Cache (Redis) connectivity & responsiveness.
-
#database(token: nil, **opts) ⇒ Forem::ForemObject
Database connectivity & responsiveness.
Methods inherited from BaseService
Constructor Details
This class inherits a constructor from Forem::Services::BaseService
Instance Method Details
#app(token: nil, **opts) ⇒ Forem::ForemObject
Application-server health.
25 26 27 |
# File 'lib/forem/services/health_check_service.rb', line 25 def app(token: nil, **opts) HealthCheck.app(token: token, **opts_with_requestor(opts)) end |
#cache(token: nil, **opts) ⇒ Forem::ForemObject
Cache (Redis) connectivity & responsiveness.
41 42 43 |
# File 'lib/forem/services/health_check_service.rb', line 41 def cache(token: nil, **opts) HealthCheck.cache(token: token, **opts_with_requestor(opts)) end |
#database(token: nil, **opts) ⇒ Forem::ForemObject
Database connectivity & responsiveness.
33 34 35 |
# File 'lib/forem/services/health_check_service.rb', line 33 def database(token: nil, **opts) HealthCheck.database(token: token, **opts_with_requestor(opts)) end |