1.0.7 • Published 2 months ago

@restorecommerce/koa-health-check v1.0.7

Weekly downloads
297
License
MIT
Repository
github
Last release
2 months ago

Koa Health Check

VersionBuild StatusDependenciesCoverage Status

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 StatusReadiness Status CodeLiveness Status CodeCombined Health Status Code
STARTING503 UNAVAILABLE200 OK503 UNAVAILABLE
UP200 OK200 OK200 OK
DOWN503 UNAVAILABLE503 UNAVAILABLE503 UNAVAILABLE
STOPPING503 UNAVAILABLE503 UNAVAILABLE503 UNAVAILABLE
STOPPED503 UNAVAILABLE503 UNAVAILABLE503 UNAVAILABLE
-500 SERVER ERROR500 SERVER ERROR500 SERVER ERROR

Development

To build the library, use npm run build command.

To run the tests, use npm run test command.

1.0.7

2 months ago

1.0.6

3 months ago

1.0.5

5 months ago

1.0.4

7 months ago

1.0.3

10 months ago

1.0.2

11 months ago

1.0.1

2 years ago

1.0.0

2 years ago

0.1.11

2 years ago

0.1.12

2 years ago

0.1.10

2 years ago

0.1.9

3 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.4

3 years ago

0.1.5

3 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

5 years ago