Skip to content

Commit

Permalink
Merge pull request #89 from Topl/BN-1018-create-g-rpc-health-check-in…
Browse files Browse the repository at this point in the history
…-bifrost

[BN-1018] Add gRPC Health Check Proto
  • Loading branch information
admiraladmirable committed Sep 15, 2023
2 parents 007e03f + ef032f6 commit 7b03091
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
11 changes: 11 additions & 0 deletions proto/google/models/health_models.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
syntax = "proto3";

package grpc.health.v1;

enum ServingStatus {
UNKNOWN = 0; // Default status. Indicates that no stats was returned.
SERVING = 1; // Service is in a healthy state.
NOT_SERVING = 2; // Service is unhealthy. Reason is implementation specific.
SERVICE_UNKNOWN = 3; // Used only by the Watch method.
}

19 changes: 19 additions & 0 deletions proto/google/services/health_rpc.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
syntax = "proto3";

package grpc.health.v1;

import 'google/models/health_models.proto';

message HealthCheckRequest {
string service = 1;
}

message HealthCheckResponse {
ServingStatus status = 1;
}

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

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

0 comments on commit 7b03091

Please sign in to comment.