{"_id":"@bermilabs/grpc-health-check","_rev":"1-2b101d05ac8b7d3a7818e1d50944a592","name":"@bermilabs/grpc-health-check","dist-tags":{"latest":"2.0.0"},"versions":{"2.0.0":{"name":"@bermilabs/grpc-health-check","version":"2.0.0","author":{"name":"Google Inc."},"description":"Health check client and service for use with gRPC-node","repository":{"type":"git","url":"git+https://github.com/grpc/grpc-node.git"},"bugs":{"url":"https://github.com/grpc/grpc-node/issues"},"contributors":[{"name":"Michael Lumish","email":"mlumish@google.com"}],"dependencies":{"@grpc/grpc-js":"^1.2.0","google-protobuf":"^3.4.0","lodash.clone":"^4.5.0","lodash.get":"^4.4.2"},"main":"health.js","license":"Apache-2.0","scripts":{"test":"mocha"},"devDependencies":{"mocha":"^8.2.1"},"homepage":"https://github.com/grpc/grpc-node#readme","_id":"@bermilabs/grpc-health-check@2.0.0","_nodeVersion":"12.19.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-pONDikNfLFrjGeT7mT73L4CifRITCZ9TlsmjelI9tGrQPfVCt27EBxxTcMQ2iwpB+7+0N2IIGTeE7u9G6lycqg==","shasum":"8386f93b9c97aea0f11bfd6bb3713e2595c783f8","tarball":"https://registry.npmjs.org/@bermilabs/grpc-health-check/-/grpc-health-check-2.0.0.tgz","fileCount":6,"unpackedSize":28802,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfsBgbCRA9TVsSAnZWagAAIvUP/iL+HeBlr0ijWiGtSP2f\n4pS/IBF3L2TOzyG6NXARgS9n9P3p783uzQ9RVJZ/PdhjnC8+uQiKrsCk/hQe\nLgpPU3rlT/25IsbKdqcbnzkMrTgzFSLCMNQPHLYRHhLT2OkDQfA2PMyZ0FY6\nkyR//Oke1txtLOdRoCOCeinBLYuYPrDFO95pnABUdF4NEgwdEaIcGmviNNGa\nHqGYQrB/00C7l9MNzRWXR+DottVx4QVkZKNabD4ooTW1riso2BH3LBszS7op\nJ0abRD2RCGrt7iKRAXBSCwnK6CVbjSoGgOoEK/EGItWjuvudWg5dUydSEQ7w\nKFVzV/D+e4fjalxEgVb1Sjoz5G3Qp5iKyeaKqCF0vLVtuwN9aL7brZi+AVZP\ngUIqrVc4N6DaPQdJw0ZySC4zubFzVpErD71NcMsPE3LHSSsKCDPz5lnYvcsu\n63lrG5yX7DNNFOsD0OoJ8aWNA1QWCJrK3+9/5O+GDeAgWzK0MmhJTYm6+obX\nbmDUbGY8xed04QvQSwaLKNbvqC/h74wpmDVpeeNxwPNF2bXOjlE5F6Kc3V8G\ns6/wOsPtnhQZJ2tRX4UWUNOyrYpSXTtZvdGmvnVVeuw5kZ0jPmISD/81fw1J\n5zqmJopHrHSB7rQSUVX8cxgu8bKmAc2VvGXw0eg04A7eFQBH9tv6LnB8kUag\nTxVx\r\n=GLkm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICEzMsUxdl2mwxd2iis5ZkIdhgg/Le07bRuWibL/LTclAiAmtapmQRUHIvvbqhyNQW8BOXDc7Voh9mL7HoNrPYahTw=="}]},"_npmUser":{"name":"bermi","email":"bermi@bermilabs.com"},"directories":{},"maintainers":[{"name":"bermi","email":"bermi@bermilabs.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/grpc-health-check_2.0.0_1605376026747_0.9489882816879132"},"_hasShrinkwrap":false}},"time":{"created":"2020-11-14T17:47:06.490Z","2.0.0":"2020-11-14T17:47:06.867Z","modified":"2022-04-04T18:31:43.130Z"},"maintainers":[{"name":"bermi","email":"bermi@bermilabs.com"}],"description":"Health check client and service for use with gRPC-node","homepage":"https://github.com/grpc/grpc-node#readme","repository":{"type":"git","url":"git+https://github.com/grpc/grpc-node.git"},"contributors":[{"name":"Michael Lumish","email":"mlumish@google.com"}],"author":{"name":"Google Inc."},"bugs":{"url":"https://github.com/grpc/grpc-node/issues"},"license":"Apache-2.0","readme":"# grpc-health-check\n\nHealth check client and service for use with gRPC-node.\n\n## Background\n\nThis package exports both a client and server that adhere to the [gRPC Health Checking Protocol](https://github.com/grpc/grpc/blob/master/doc/health-checking.md).\n\nBy using this package, clients and servers can rely on common proto and service definitions. This means:\n- Clients can use the generated stubs to health check _any_ server that adheres to the protocol.\n- Servers do not reimplement common logic for publishing health statuses.\n\n## Installation\n\nUse the package manager [npm](https://www.npmjs.com/get-npm) to install `grpc-health-check`.\n\n```bash\nnpm install grpc-health-check\n```\n\n## Usage\n\n### Server\n\nAny gRPC-node server can use `grpc-health-check` to adhere to the gRPC Health Checking Protocol. \nThe following shows how this package can be added to a pre-existing gRPC server.\n\n```javascript 1.8\n// Import package\nlet health = require('grpc-health-check');\n\n// Define service status map. Key is the service name, value is the corresponding status.\n// By convention, the empty string \"\" key represents that status of the entire server.\nconst statusMap = {\n  \"ServiceFoo\": proto.grpc.health.v1.HealthCheckResponse.ServingStatus.SERVING,\n  \"ServiceBar\": proto.grpc.health.v1.HealthCheckResponse.ServingStatus.NOT_SERVING,\n  \"\": proto.grpc.health.v1.HealthCheckResponse.ServingStatus.NOT_SERVING,\n};\n\n// Construct the service implementation\nlet healthImpl = new health.Implementation(statusMap);\n\n// Add the service and implementation to your pre-existing gRPC-node server\nserver.addService(health.service, healthImpl);\n```\n\nCongrats! Your server now allows any client to run a health check against it.\n\n### Client\n\nAny gRPC-node client can use `grpc-health-check` to run health checks against other servers that follow the protocol.\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\nPlease make sure to update tests as appropriate.\n\n## License\n[Apache License 2.0](https://choosealicense.com/licenses/apache-2.0/)\n","readmeFilename":"README.md"}