fix golint issues in zrpc (#531)
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
// A RpcProxy is a rpc proxy.
|
||||
type RpcProxy struct {
|
||||
backend string
|
||||
clients map[string]Client
|
||||
@@ -18,6 +19,7 @@ type RpcProxy struct {
|
||||
lock sync.Mutex
|
||||
}
|
||||
|
||||
// NewProxy returns a RpcProxy.
|
||||
func NewProxy(backend string, opts ...internal.ClientOption) *RpcProxy {
|
||||
return &RpcProxy{
|
||||
backend: backend,
|
||||
@@ -27,6 +29,7 @@ func NewProxy(backend string, opts ...internal.ClientOption) *RpcProxy {
|
||||
}
|
||||
}
|
||||
|
||||
// TakeConn returns a grpc.ClientConn.
|
||||
func (p *RpcProxy) TakeConn(ctx context.Context) (*grpc.ClientConn, error) {
|
||||
cred := auth.ParseCredential(ctx)
|
||||
key := cred.App + "/" + cred.Token
|
||||
|
||||
Reference in New Issue
Block a user