rename rpcx to zrpc
This commit is contained in:
@@ -3,6 +3,6 @@
|
||||
"ListenOn": "0.0.0.0:3456",
|
||||
"Etcd": {
|
||||
"Hosts": ["etcd.discov:2379"],
|
||||
"Key": "rpcx"
|
||||
"Key": "zrpc"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
"github.com/tal-tech/go-zero/core/conf"
|
||||
"github.com/tal-tech/go-zero/example/graceful/etcd/rpc/graceful"
|
||||
"github.com/tal-tech/go-zero/rpcx"
|
||||
"github.com/tal-tech/go-zero/zrpc"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
@@ -39,10 +39,10 @@ func (gs *GracefulServer) Grace(ctx context.Context, req *graceful.Request) (*gr
|
||||
func main() {
|
||||
flag.Parse()
|
||||
|
||||
var c rpcx.RpcServerConf
|
||||
var c zrpc.RpcServerConf
|
||||
conf.MustLoad(*configFile, &c)
|
||||
|
||||
server := rpcx.MustNewServer(c, func(grpcServer *grpc.Server) {
|
||||
server := zrpc.MustNewServer(c, func(grpcServer *grpc.Server) {
|
||||
graceful.RegisterGraceServiceServer(grpcServer, NewGracefulServer())
|
||||
})
|
||||
defer server.Stop()
|
||||
|
||||
Reference in New Issue
Block a user