VOL-2098 Add probe argument to NewGrpcServer; Release 2.2.12
Change-Id: I76ceb9efe280c66c67edc5fef85cc8060c670a5e
diff --git a/pkg/grpc/server.go b/pkg/grpc/server.go
index 488d470..7796b83 100644
--- a/pkg/grpc/server.go
+++ b/pkg/grpc/server.go
@@ -79,12 +79,14 @@
port int,
certs *GrpcSecurity,
secure bool,
+ probe ReadyProbe,
) *GrpcServer {
server := &GrpcServer{
address: address,
port: port,
secure: secure,
GrpcSecurity: certs,
+ probe: probe,
}
return server
}
@@ -124,12 +126,6 @@
}
}
-// Attach a readiness probe to the server.
-// If the probe returns NotReady, the server will return UNAVAILABLE
-func (s *GrpcServer) AttachReadyProbe(p ReadyProbe) {
- s.probe = p
-}
-
func withServerUnaryInterceptor(s *GrpcServer) grpc.ServerOption {
return grpc.UnaryInterceptor(mkServerInterceptor(s))
}