refactor rpcx, export WithDialOption and WithTimeout

This commit is contained in:
kevin
2020-08-11 14:33:10 +08:00
parent 95226762ba
commit 08fa64d553
7 changed files with 27 additions and 20 deletions

View File

@@ -12,7 +12,7 @@ import (
type RpcProxy struct {
backend string
clients map[string]*RpcClient
clients map[string]Client
options []internal.ClientOption
sharedCalls syncx.SharedCalls
lock sync.Mutex
@@ -21,7 +21,7 @@ type RpcProxy struct {
func NewRpcProxy(backend string, opts ...internal.ClientOption) *RpcProxy {
return &RpcProxy{
backend: backend,
clients: make(map[string]*RpcClient),
clients: make(map[string]Client),
options: opts,
sharedCalls: syncx.NewSharedCalls(),
}