1.0.9 • Published 1 year ago
@restorecommerce/koa-health-check v1.0.9
Koa Health Check
Cloud Health Connect provides a Koa Middleware based on Cloud Health. The following endpoints are provided to monitor services and applications on Kubernetes:
- Health Endpoint
- Liveness Endpoint
- Readiness Endpoint
Usage
import * as Koa from 'koa';
import * as health from '@cloudnative/health';
import { HealthEndpoint, ReadinessEndpoint, LivenessEndpoint } from 'koa-health-check';
const healthcheck = new health.HealthChecker();
const koa = new Koa();
koa.all('/live', LivenessEndpoint(healthcheck));
koa.all('/ready', ReadinessEndpoint(healthcheck));
koa.all('/health', HealthEndpoint(healthcheck));Status Responses
| Cloud Health Status | Readiness Status Code | Liveness Status Code | Combined Health Status Code |
|---|---|---|---|
| STARTING | 503 UNAVAILABLE | 200 OK | 503 UNAVAILABLE |
| UP | 200 OK | 200 OK | 200 OK |
| DOWN | 503 UNAVAILABLE | 503 UNAVAILABLE | 503 UNAVAILABLE |
| STOPPING | 503 UNAVAILABLE | 503 UNAVAILABLE | 503 UNAVAILABLE |
| STOPPED | 503 UNAVAILABLE | 503 UNAVAILABLE | 503 UNAVAILABLE |
| - | 500 SERVER ERROR | 500 SERVER ERROR | 500 SERVER ERROR |
Development
To build the library, use npm run build command.
To run the tests, use npm run test command.
1.0.9
1 year ago
1.0.8
2 years ago
1.0.7
2 years ago
1.0.6
2 years ago
1.0.5
2 years ago
1.0.4
2 years ago
1.0.3
2 years ago
1.0.2
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago
0.1.11
4 years ago
0.1.12
4 years ago
0.1.10
4 years ago
0.1.9
4 years ago
0.1.8
4 years ago
0.1.7
4 years ago
0.1.4
5 years ago
0.1.5
5 years ago
0.1.3
6 years ago
0.1.2
6 years ago
0.1.1
6 years ago
0.1.0
7 years ago