rename rpcx to zrpc

This commit is contained in:
kevin
2020-09-18 11:41:52 +08:00
parent 26e16107ce
commit 0b1ee79d3a
110 changed files with 154 additions and 154 deletions

View File

@@ -7,7 +7,7 @@ import (
"github.com/tal-tech/go-zero/core/conf"
"github.com/tal-tech/go-zero/example/tracing/remote/portal"
"github.com/tal-tech/go-zero/example/tracing/remote/user"
"github.com/tal-tech/go-zero/rpcx"
"github.com/tal-tech/go-zero/zrpc"
"google.golang.org/grpc"
)
@@ -15,16 +15,16 @@ var configFile = flag.String("f", "etc/config.json", "the config file")
type (
Config struct {
rpcx.RpcServerConf
UserRpc rpcx.RpcClientConf
zrpc.RpcServerConf
UserRpc zrpc.RpcClientConf
}
PortalServer struct {
userRpc rpcx.Client
userRpc zrpc.Client
}
)
func NewPortalServer(client rpcx.Client) *PortalServer {
func NewPortalServer(client zrpc.Client) *PortalServer {
return &PortalServer{
userRpc: client,
}
@@ -53,8 +53,8 @@ func main() {
var c Config
conf.MustLoad(*configFile, &c)
client := rpcx.MustNewClient(c.UserRpc)
server := rpcx.MustNewServer(c.RpcServerConf, func(grpcServer *grpc.Server) {
client := zrpc.MustNewClient(c.UserRpc)
server := zrpc.MustNewServer(c.RpcServerConf, func(grpcServer *grpc.Server) {
portal.RegisterPortalServer(grpcServer, NewPortalServer(client))
})
server.Start()