update grpc name
This commit is contained in:
parent
1c5ad5f20b
commit
ba07afbf5f
@ -2,6 +2,7 @@ package grpcx
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
|
"path/filepath"
|
||||||
|
|
||||||
"git.linkiio.cn/linkpay/invoke/chain"
|
"git.linkiio.cn/linkpay/invoke/chain"
|
||||||
"git.linkiio.cn/linkpay/protobuf"
|
"git.linkiio.cn/linkpay/protobuf"
|
||||||
@ -43,6 +44,10 @@ func Registry(f ...func(s *grpcx.GrpcServer)) *grpcx.GrpcServer {
|
|||||||
grpcx.Resolver.Register(Etcd())
|
grpcx.Resolver.Register(Etcd())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if GrpcConfig.Name == "default" || GrpcConfig.Name == "" {
|
||||||
|
GrpcConfig.Name = filepath.Base(os.Args[0])
|
||||||
|
}
|
||||||
|
|
||||||
s := grpcx.Server.New(GrpcConfig)
|
s := grpcx.Server.New(GrpcConfig)
|
||||||
|
|
||||||
for _, fn := range f {
|
for _, fn := range f {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user