@connectum/healthcheck
gRPC health protocol, HTTP health/readiness endpoints, and mutable serving state.
Install
bash
npm install @connectum/healthcheckbash
pnpm add @connectum/healthcheckbash
bun add @connectum/healthcheckPeer dependencies: @connectum/core, @bufbuild/protobuf ^2.16.0 and @connectrpc/connect ^2.2.0, shared with your application. npm 7+, pnpm and Bun install missing peers automatically; on Yarn, add them yourself — see Peer dependencies on protobuf and Connect.
Start Here
Use the greeterService definition from Quickstart.
typescript
import { createServer } from '@connectum/core';
import { Healthcheck, healthcheckManager, ServingStatus } from '@connectum/healthcheck';
const server = createServer({
services: [greeterService],
protocols: [Healthcheck({ httpEnabled: true })],
});
server.on('ready', () => healthcheckManager.update(ServingStatus.SERVING));
server.on('stopping', () => healthcheckManager.update(ServingStatus.NOT_SERVING));
await server.start();Key Entry Points
| Entry point | Use it to |
|---|---|
Healthcheck | Register gRPC health and optional HTTP endpoints. |
healthcheckManager | Update overall or per-service serving state. |
ServingStatus | Use protocol-defined readiness values. |
Learn / Configure / API Reference
- Learn: Focused guide
- Configure: Task and configuration guidance
- API reference: Exact options and symbols
- Package API index: Generated TypeDoc
- Source: @connectum/healthcheck on GitHub
Related Modules
Compare all Connectum packages by capability.