Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/astj/yet-another-grpc-js-health-check
concept work
https://github.com/astj/yet-another-grpc-js-health-check
Last synced: 14 days ago
JSON representation
concept work
- Host: GitHub
- URL: https://github.com/astj/yet-another-grpc-js-health-check
- Owner: astj
- Created: 2021-07-29T18:29:49.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-08-04T16:06:21.000Z (over 3 years ago)
- Last Synced: 2024-10-11T21:42:22.201Z (about 1 month ago)
- Language: JavaScript
- Size: 174 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @astj/grpc-js-health-check
Yet another [GRPC Health Checking Protocol](https://github.com/grpc/grpc/blob/master/doc/health-checking.md) server implementation for [@grpc/grpc-js](https://www.npmjs.com/package/@grpc/grpc-js).
This implementation is made as @astj's hobby, and maybe you should use [grpc-js-health-check](https://www.npmjs.com/package/grpc-js-health-check) in most cases.
## Features
- Implements necessary methods for [grpc_health_probe](https://github.com/grpc-ecosystem/grpc-health-probe)
- In other words, `Watch` is not implemented
- Works with [@grpc/grpc-js](https://www.npmjs.com/package/@grpc/grpc-js)
- Fully written with TypeScript and static code generation## Usage
```typescript
import * as grpc from '@grpc/grpc-js';
import { HealthChecker, HealthService, ServingStatus } from '@astj/grpc-js-health-check';const healthChecker = new HealthChecker({
'': ServingStatus.SERVING,
'some/service': ServingStatus.NOT_SERVING,
});
const server = new grpc.Server();
server.addService(HealthService, healthChecker.server);// If you'd like to change status afterwards:
healthChecker.setStatus('some/service', ServingStatus.SERVING);
```## License
Apache 2.0