You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
711 B
26 lines
711 B
syntax="proto3";
|
|
option go_package = "./";
|
|
|
|
// go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
|
|
// go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
|
|
// go get google.golang.org/grpc
|
|
|
|
// protoc -I=api/proto --go_out=pkg/api --go_opt=paths=source_relative --go-grpc_out=pkg/api --go-grpc_opt=paths=source_relative api/proto/check.proto
|
|
|
|
message HealthCheckRequest {
|
|
string service = 1;
|
|
}
|
|
|
|
message HealthCheckResponse {
|
|
enum ServingStatus {
|
|
UNKNOWN = 0;
|
|
SERVING = 1;
|
|
NOT_SERVING = 2;
|
|
}
|
|
ServingStatus status = 1;
|
|
}
|
|
|
|
service Health {
|
|
rpc Check(HealthCheckRequest) returns (HealthCheckResponse);
|
|
rpc Watch(HealthCheckRequest) returns (stream HealthCheckResponse);
|
|
} |