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

@@ -2,10 +2,10 @@ package config
import (
"github.com/tal-tech/go-zero/rest"
"github.com/tal-tech/go-zero/rpcx"
"github.com/tal-tech/go-zero/zrpc"
)
type Config struct {
rest.RestConf
Rpc rpcx.RpcClientConf
Rpc zrpc.RpcClientConf
}

View File

@@ -6,7 +6,7 @@
"Rpc": {
"Etcd": {
"Hosts": ["etcd.discov:2379"],
"Key": "rpcx"
"Key": "zrpc"
}
}
}
}

View File

@@ -8,7 +8,7 @@ import (
"github.com/tal-tech/go-zero/example/graceful/etcd/api/handler"
"github.com/tal-tech/go-zero/example/graceful/etcd/api/svc"
"github.com/tal-tech/go-zero/rest"
"github.com/tal-tech/go-zero/rpcx"
"github.com/tal-tech/go-zero/zrpc"
)
var configFile = flag.String("f", "etc/graceful-api.json", "the config file")
@@ -19,7 +19,7 @@ func main() {
var c config.Config
conf.MustLoad(*configFile, &c)
client := rpcx.MustNewClient(c.Rpc)
client := zrpc.MustNewClient(c.Rpc)
ctx := &svc.ServiceContext{
Client: client,
}

View File

@@ -1,7 +1,7 @@
package svc
import "github.com/tal-tech/go-zero/rpcx"
import "github.com/tal-tech/go-zero/zrpc"
type ServiceContext struct {
Client rpcx.Client
Client zrpc.Client
}