Skip to content

Commit 21d40b0

Browse files
authored
Merge pull request #2951 from MatiasManevi/health_list_js
Add List method to Health service
2 parents 0157776 + 1605b71 commit 21d40b0

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

packages/grpc-health-check/proto/health/v1/health.proto

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ option java_multiple_files = true;
2525
option java_outer_classname = "HealthProto";
2626
option java_package = "io.grpc.health.v1";
2727

28+
message HealthListRequest {}
29+
30+
message HealthListResponse {
31+
// statuses contains all the services and their respective status.
32+
map<string, HealthCheckResponse> statuses = 1;
33+
}
34+
2835
message HealthCheckRequest {
2936
string service = 1;
3037
}
@@ -70,4 +77,17 @@ service Health {
7077
// call. If the call terminates with any other status (including OK),
7178
// clients should retry the call with appropriate exponential backoff.
7279
rpc Watch(HealthCheckRequest) returns (stream HealthCheckResponse);
80+
81+
// List provides a non-atomic snapshot of the health of all the available
82+
// services.
83+
//
84+
// The server may respond with a RESOURCE_EXHAUSTED error if too many services
85+
// exist.
86+
//
87+
// Clients should set a deadline when calling List, and can declare the server
88+
// unhealthy if they do not receive a timely response.
89+
//
90+
// Clients should keep in mind that the list of health services exposed by an
91+
// application can change over the lifetime of the process.
92+
rpc List(HealthListRequest) returns (HealthListResponse);
7393
}

0 commit comments

Comments
 (0)