@himenon/ts-grpc-health-check
TypeScript icon, indicating that this package has built-in type declarations

1.3.10 • Public • Published

@himenon/ts-grpc-health-check

Usage

npm i @himenon/ts-grpc-health-check
# or
pnpm i @himenon/ts-grpc-health-check
import health from "@himenon/ts-grpc-health-check";

const statusMap = {
  ServiceFoo: proto.grpc.health.v1.HealthCheckResponse.ServingStatus.SERVING,
  ServiceBar: proto.grpc.health.v1.HealthCheckResponse.ServingStatus.NOT_SERVING,
  "": proto.grpc.health.v1.HealthCheckResponse.ServingStatus.NOT_SERVING,
};

const healthImpl = health.createHealthServerImpl(statusMap);

// Add the service and implementation to your pre-existing gRPC-node server
server.addService(health.service, healthImpl);

Development

pnpm i
# For Apple Silicon
npm_config_target_arch=x64 npm_config_arch=x64 pnpm i

Release

  • Automatic version updates are performed when merged into the main branch.

LICENCE

@Himenon/template-esm-js・MIT

Package Sidebar

Install

npm i @himenon/ts-grpc-health-check

Weekly Downloads

1

Version

1.3.10

License

MIT

Unpacked Size

27.4 kB

Total Files

11

Last publish

Collaborators

  • himenoglyph