Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add List method to Health service #143

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions grpc/health/v1/health.proto
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ message HealthCheckResponse {
ServingStatus status = 1;
}

message HealthListRequest {
repeated string services = 1; // Contains the name of the services that should be obtained. If empty, must returns all.
}

message HealthListResponse {
map<string, HealthCheckResponse> statuses = 1; // Contains all the services and their respective status.
}

// Health is gRPC's mechanism for checking whether a server is able to handle
// RPCs. Its semantics are documented in
// https://github.com/grpc/grpc/blob/master/doc/health-checking.md.
Expand All @@ -54,6 +62,19 @@ service Health {
// Check implementations should be idempotent and side effect free.
rpc Check(HealthCheckRequest) returns (HealthCheckResponse);

// List gets the health of all the available services. A filtered list can
// be obtained by sending the list of the respective service names. If the
// list of service names is empty, all the available services must be returned.
//
// Use case: Integrate servers and status report dashboards.
//
// Clients should set a deadline when calling List, and can declare the
// server unhealthy if they do not receive a timely response.
//
//
// List implementations should be idempotent and side effect free.
rpc List(HealthListRequest) returns (HealthCheckResponse);

// Performs a watch for the serving status of the requested service.
// The server will immediately send back a message indicating the current
// serving status. It will then subsequently send a new message whenever
Expand Down