refactor rpcx, export WithDialOption and WithTimeout
This commit is contained in:
@@ -3,5 +3,5 @@ package svc
|
||||
import "github.com/tal-tech/go-zero/rpcx"
|
||||
|
||||
type ServiceContext struct {
|
||||
Client *rpcx.RpcClient
|
||||
Client rpcx.Client
|
||||
}
|
||||
|
||||
@@ -3,5 +3,5 @@ package svc
|
||||
import "github.com/tal-tech/go-zero/rpcx"
|
||||
|
||||
type ServiceContext struct {
|
||||
Client *rpcx.RpcClient
|
||||
Client rpcx.Client
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
|
||||
var (
|
||||
configFile = flag.String("f", "config.json", "the config file")
|
||||
client *rpcx.RpcClient
|
||||
client rpcx.Client
|
||||
)
|
||||
|
||||
func handle(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
@@ -20,11 +20,11 @@ type (
|
||||
}
|
||||
|
||||
PortalServer struct {
|
||||
userRpc *rpcx.RpcClient
|
||||
userRpc rpcx.Client
|
||||
}
|
||||
)
|
||||
|
||||
func NewPortalServer(client *rpcx.RpcClient) *PortalServer {
|
||||
func NewPortalServer(client rpcx.Client) *PortalServer {
|
||||
return &PortalServer{
|
||||
userRpc: client,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user