rename rpcx to zrpc
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"Rpc": {
|
||||
"Etcd": {
|
||||
"Hosts": ["etcd.discov:2379"],
|
||||
"Key": "rpcx"
|
||||
"Key": "zrpc"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user