|
|
@ -14,6 +14,7 @@ import ( |
|
|
|
"google.golang.org/grpc" |
|
|
|
"google.golang.org/grpc" |
|
|
|
"google.golang.org/grpc/health" |
|
|
|
"google.golang.org/grpc/health" |
|
|
|
healthpb "google.golang.org/grpc/health/grpc_health_v1" |
|
|
|
healthpb "google.golang.org/grpc/health/grpc_health_v1" |
|
|
|
|
|
|
|
"google.golang.org/grpc/reflection" |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
const loggerName = "transport/grpc" |
|
|
|
const loggerName = "transport/grpc" |
|
|
@ -104,6 +105,8 @@ func NewServer(opts ...ServerOption) *Server { |
|
|
|
srv.Server = grpc.NewServer(grpcOpts...) |
|
|
|
srv.Server = grpc.NewServer(grpcOpts...) |
|
|
|
// grpc health register
|
|
|
|
// grpc health register
|
|
|
|
healthpb.RegisterHealthServer(srv.Server, srv.health) |
|
|
|
healthpb.RegisterHealthServer(srv.Server, srv.health) |
|
|
|
|
|
|
|
// reflection register
|
|
|
|
|
|
|
|
reflection.Register(srv.Server) |
|
|
|
return srv |
|
|
|
return srv |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|