pull/351/head
wangchuxiao 2 years ago
parent 07170135e6
commit aa6b439e8c

@ -56,7 +56,7 @@ func (r *RPCServer) run() {
defer listener.Close()
var grpcOpts []grpc.ServerOption
if config.Config.Prometheus.Enable {
grpcOpts = append(grpcOpts, promePkg.UnaryServerInterceptorProme)
grpcOpts = append(grpcOpts, grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme))
}
srv := grpc.NewServer(grpcOpts...)
defer srv.GracefulStop()

@ -45,7 +45,7 @@ func (r *RPCServer) run() {
defer listener.Close()
var grpcOpts []grpc.ServerOption
if config.Config.Prometheus.Enable {
grpcOpts = append(grpcOpts, promePkg.UnaryServerInterceptorProme)
grpcOpts = append(grpcOpts, grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme))
}
srv := grpc.NewServer(grpcOpts...)
defer srv.GracefulStop()

@ -128,7 +128,7 @@ func (rpc *rpcAuth) Run() {
log.NewInfo(operationID, "listen network success, ", address, listener)
var grpcOpts []grpc.ServerOption
if config.Config.Prometheus.Enable {
grpcOpts = append(grpcOpts, promePkg.UnaryServerInterceptorProme)
grpcOpts = append(grpcOpts, grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme))
}
srv := grpc.NewServer(grpcOpts...)
defer srv.GracefulStop()

@ -187,7 +187,7 @@ func (rpc *rpcConversation) Run() {
//grpc server
var grpcOpts []grpc.ServerOption
if config.Config.Prometheus.Enable {
grpcOpts = append(grpcOpts, promePkg.UnaryServerInterceptorProme)
grpcOpts = append(grpcOpts, grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme))
}
srv := grpc.NewServer(grpcOpts...)
defer srv.GracefulStop()

@ -63,7 +63,7 @@ func (s *friendServer) Run() {
//grpc server
var grpcOpts []grpc.ServerOption
if config.Config.Prometheus.Enable {
grpcOpts = append(grpcOpts, promePkg.UnaryServerInterceptorProme)
grpcOpts = append(grpcOpts, grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme))
}
srv := grpc.NewServer(grpcOpts...)
defer srv.GracefulStop()

@ -72,7 +72,7 @@ func (s *groupServer) Run() {
}
var grpcOpts []grpc.ServerOption
if config.Config.Prometheus.Enable {
grpcOpts = append(grpcOpts, promePkg.UnaryServerInterceptorProme)
grpcOpts = append(grpcOpts, grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme))
}
srv := grpc.NewServer(options...)
defer srv.GracefulStop()

@ -69,7 +69,7 @@ func (rpc *rpcChat) Run() {
var grpcOpts []grpc.ServerOption
if config.Config.Prometheus.Enable {
grpcOpts = append(grpcOpts, promePkg.UnaryServerInterceptorProme)
grpcOpts = append(grpcOpts, grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme))
}
srv := grpc.NewServer(grpcOpts...)
defer srv.GracefulStop()

@ -64,7 +64,7 @@ func (s *userServer) Run() {
//grpc server
var grpcOpts []grpc.ServerOption
if config.Config.Prometheus.Enable {
grpcOpts = append(grpcOpts, promePkg.UnaryServerInterceptorProme)
grpcOpts = append(grpcOpts, grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme))
}
srv := grpc.NewServer(grpcOpts...)
defer srv.GracefulStop()

Loading…
Cancel
Save