Unexport service name in health package
It's not used outside the package so this is unnecessary.
@@ -6,9 +6,7 @@ import (
"google.golang.org/grpc/health/grpc_health_v1"
)
-const (
- ServiceName = "proto.API" // taken from compiled protobuf file api.go.pb (line 793)
-)
+const serviceName = "proto.API" // taken from compiled protobuf file api.go.pb (line 793)
var server = health.NewServer()
@@ -17,9 +15,9 @@ func Register(srv *grpc.Server) {
}
func SetServing() {
- server.SetServingStatus(ServiceName, grpc_health_v1.HealthCheckResponse_SERVING)
+ server.SetServingStatus(serviceName, grpc_health_v1.HealthCheckResponse_SERVING)
}
func SetNotServing() {
- server.SetServingStatus(ServiceName, grpc_health_v1.HealthCheckResponse_NOT_SERVING)
+ server.SetServingStatus(serviceName, grpc_health_v1.HealthCheckResponse_NOT_SERVING)
}
