This health service implements the gRPC Health Checking Protocol, as defined in https://github.com/grpc/grpc/blob/master/doc/health-checking.md and as implemented by the gRPC authors in https://pkg.go.dev/google.golang.org/grpc/health@v1.29.0 It simply instantiates a health service, and attaches it to the same gRPC server that is handling requests to the primary (e.g. CA) service. When the main service would be shut down (e.g. because it caught a signal), it also sets the status of the service to NOT_SERVING. This change also imports the health client into our grpc client, ensuring that all of our grpc clients use the health service to inform their load-balancing behavior. This will be used to replace our current usage of polling the debug port to determine whether a given service is up and running. It may also be useful for more comprehensive checks and blackbox probing in the future. Part of #5074 |
||
|---|---|---|
| .. | ||
| main.go | ||
| main_test.go | ||