rename rpcx to zrpc
This commit is contained in:
@@ -14,7 +14,7 @@ import (
|
||||
|
||||
"github.com/tal-tech/go-zero/core/conf"
|
||||
"github.com/tal-tech/go-zero/core/logx"
|
||||
"github.com/tal-tech/go-zero/rpcx"
|
||||
"github.com/tal-tech/go-zero/zrpc"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
@@ -28,7 +28,7 @@ func main() {
|
||||
ctx := svc.NewServiceContext(c)
|
||||
adderSrv := server.NewAdderServer(ctx)
|
||||
|
||||
s, err := rpcx.NewServer(c.RpcServerConf, func(grpcServer *grpc.Server) {
|
||||
s, err := zrpc.NewServer(c.RpcServerConf, func(grpcServer *grpc.Server) {
|
||||
add.RegisterAdderServer(grpcServer, adderSrv)
|
||||
})
|
||||
logx.Must(err)
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"context"
|
||||
|
||||
"github.com/tal-tech/go-zero/core/jsonx"
|
||||
"github.com/tal-tech/go-zero/rpcx"
|
||||
"github.com/tal-tech/go-zero/zrpc"
|
||||
)
|
||||
|
||||
type (
|
||||
@@ -19,11 +19,11 @@ type (
|
||||
}
|
||||
|
||||
defaultAdder struct {
|
||||
cli rpcx.Client
|
||||
cli zrpc.Client
|
||||
}
|
||||
)
|
||||
|
||||
func NewAdder(cli rpcx.Client) Adder {
|
||||
func NewAdder(cli zrpc.Client) Adder {
|
||||
return &defaultAdder{
|
||||
cli: cli,
|
||||
}
|
||||
|
||||
@@ -2,12 +2,12 @@ package config
|
||||
|
||||
import (
|
||||
"github.com/tal-tech/go-zero/core/stores/cache"
|
||||
"github.com/tal-tech/go-zero/rpcx"
|
||||
"github.com/tal-tech/go-zero/zrpc"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
rpcx.RpcServerConf
|
||||
zrpc.RpcServerConf
|
||||
DataSource string
|
||||
Table string
|
||||
Cache cache.CacheConf
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import (
|
||||
|
||||
"github.com/tal-tech/go-zero/core/conf"
|
||||
"github.com/tal-tech/go-zero/core/logx"
|
||||
"github.com/tal-tech/go-zero/rpcx"
|
||||
"github.com/tal-tech/go-zero/zrpc"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
@@ -28,7 +28,7 @@ func main() {
|
||||
ctx := svc.NewServiceContext(c)
|
||||
checkerSrv := server.NewCheckerServer(ctx)
|
||||
|
||||
s, err := rpcx.NewServer(c.RpcServerConf, func(grpcServer *grpc.Server) {
|
||||
s, err := zrpc.NewServer(c.RpcServerConf, func(grpcServer *grpc.Server) {
|
||||
check.RegisterCheckerServer(grpcServer, checkerSrv)
|
||||
})
|
||||
logx.Must(err)
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"context"
|
||||
|
||||
"github.com/tal-tech/go-zero/core/jsonx"
|
||||
"github.com/tal-tech/go-zero/rpcx"
|
||||
"github.com/tal-tech/go-zero/zrpc"
|
||||
)
|
||||
|
||||
type (
|
||||
@@ -19,11 +19,11 @@ type (
|
||||
}
|
||||
|
||||
defaultChecker struct {
|
||||
cli rpcx.Client
|
||||
cli zrpc.Client
|
||||
}
|
||||
)
|
||||
|
||||
func NewChecker(cli rpcx.Client) Checker {
|
||||
func NewChecker(cli zrpc.Client) Checker {
|
||||
return &defaultChecker{
|
||||
cli: cli,
|
||||
}
|
||||
|
||||
@@ -2,12 +2,12 @@ package config
|
||||
|
||||
import (
|
||||
"github.com/tal-tech/go-zero/core/stores/cache"
|
||||
"github.com/tal-tech/go-zero/rpcx"
|
||||
"github.com/tal-tech/go-zero/zrpc"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
rpcx.RpcServerConf
|
||||
zrpc.RpcServerConf
|
||||
DataSource string
|
||||
Table string
|
||||
Cache cache.CacheConf
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user