UNPKG

@visulima/health-check

Version:

A library built to provide support for defining service health for node services. It allows you to register async health checks for your dependencies and the service itself, provides a health endpoint that exposes their status, and health metrics.

13 lines (12 loc) 547 B
import type { IncomingMessage, ServerResponse } from "node:http"; import type { HealthCheck, HealthReport } from "../types.d.ts"; export interface HealthCheckApiPayload { appName: string; appVersion: string; message: string; reports: HealthReport; status: "error" | "ok"; timestamp: string; } declare const _default: (healthCheck: HealthCheck, sendHeader?: boolean | undefined) => <Request extends IncomingMessage, Response extends ServerResponse>(_: Request, response: Response) => Promise<void>; export default _default;