File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,8 @@ import (
3737 "github.com/spf13/viper"
3838 "google.golang.org/grpc"
3939 "google.golang.org/grpc/codes"
40+ "google.golang.org/grpc/health"
41+ "google.golang.org/grpc/health/grpc_health_v1"
4042 "google.golang.org/grpc/reflection"
4143 "google.golang.org/grpc/status"
4244)
@@ -55,6 +57,7 @@ type RpcServer struct {
5557
5658func NewServer (service configuration.Service ) * grpc.Server {
5759 s := grpc .NewServer ()
60+ grpc_health_v1 .RegisterHealthServer (s , health .NewServer ())
5861 apricotpb .RegisterApricotServer (s , & RpcServer {
5962 service : service ,
6063 })
Original file line number Diff line number Diff line change @@ -42,6 +42,8 @@ import (
4242 "github.com/jinzhu/copier"
4343 "github.com/spf13/viper"
4444 "google.golang.org/grpc/codes"
45+ "google.golang.org/grpc/health"
46+ "google.golang.org/grpc/health/grpc_health_v1"
4547 "google.golang.org/grpc/reflection"
4648 "google.golang.org/grpc/status"
4749
@@ -60,6 +62,7 @@ const MAX_ERROR_LENGTH = 6000 // gRPC seems to impose this limit on the status m
6062
6163func NewServer (state * globalState ) * grpc.Server {
6264 s := grpc .NewServer ()
65+ grpc_health_v1 .RegisterHealthServer (s , health .NewServer ())
6366 pb .RegisterControlServer (s , & RpcServer {
6467 state : state ,
6568 streams : newSafeStreamsMap (),
You can’t perform that action at this time.
0 commit comments