rename rpcx to zrpc
This commit is contained in:
@@ -2,11 +2,11 @@ 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
|
||||
Add rpcx.RpcClientConf
|
||||
Check rpcx.RpcClientConf
|
||||
}
|
||||
Add zrpc.RpcClientConf
|
||||
Check zrpc.RpcClientConf
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"bookstore/rpc/add/adder"
|
||||
"bookstore/rpc/check/checker"
|
||||
|
||||
"github.com/tal-tech/go-zero/rpcx"
|
||||
"github.com/tal-tech/go-zero/zrpc"
|
||||
)
|
||||
|
||||
type ServiceContext struct {
|
||||
@@ -17,7 +17,7 @@ type ServiceContext struct {
|
||||
func NewServiceContext(c config.Config) *ServiceContext {
|
||||
return &ServiceContext{
|
||||
Config: c,
|
||||
Adder: adder.NewAdder(rpcx.MustNewClient(c.Add)),
|
||||
Checker: checker.NewChecker(rpcx.MustNewClient(c.Check)),
|
||||
Adder: adder.NewAdder(zrpc.MustNewClient(c.Add)),
|
||||
Checker: checker.NewChecker(zrpc.MustNewClient(c.Check)),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user