Skip to content

Commit

Permalink
BAARC-98: Implement grpc health checking protocol https://github.com/…
Browse files Browse the repository at this point in the history
  • Loading branch information
boecklim committed Jan 8, 2024
1 parent c6a8ab2 commit a0cd42f
Show file tree
Hide file tree
Showing 6 changed files with 521 additions and 1 deletion.
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ gen:
--go-grpc_opt=paths=source_relative \
metamorph/metamorph_api/metamorph_api.proto

protoc \
--proto_path=. \
--go_out=. \
--go_opt=paths=source_relative \
--go-grpc_out=. \
--go-grpc_opt=paths=source_relative \
metamorph/health/grpc_health_check.proto

protoc \
--proto_path=. \
--go_out=. \
Expand Down
287 changes: 287 additions & 0 deletions metamorph/health/grpc_health_check.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions metamorph/health/grpc_health_check.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
syntax = "proto3";

option go_package = ".;healthcheck";

package grpc.health.v1;

message HealthCheckRequest {
string service = 1;
}

message HealthCheckResponse {
enum ServingStatus {
UNKNOWN = 0;
SERVING = 1;
NOT_SERVING = 2;
SERVICE_UNKNOWN = 3; // Used only by the Watch method.
}
ServingStatus status = 1;
}

service Health {
rpc Check(HealthCheckRequest) returns (HealthCheckResponse);

rpc Watch(HealthCheckRequest) returns (stream HealthCheckResponse);
}
Loading

0 comments on commit a0cd42f

Please sign in to comment.