test: add more tests (#1149)
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
||||
"log"
|
||||
"time"
|
||||
|
||||
"github.com/tal-tech/go-zero/core/discov"
|
||||
"github.com/tal-tech/go-zero/zrpc/internal"
|
||||
"github.com/tal-tech/go-zero/zrpc/internal/auth"
|
||||
"google.golang.org/grpc"
|
||||
@@ -79,18 +78,6 @@ func NewClient(c RpcClientConf, options ...ClientOption) (Client, error) {
|
||||
}, nil
|
||||
}
|
||||
|
||||
// NewClientNoAuth returns a Client without authentication.
|
||||
func NewClientNoAuth(c discov.EtcdConf, opts ...ClientOption) (Client, error) {
|
||||
client, err := internal.NewClient(internal.BuildDiscovTarget(c.Hosts, c.Key), opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &RpcClient{
|
||||
client: client,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// NewClientWithTarget returns a Client with connecting to given target.
|
||||
func NewClientWithTarget(target string, opts ...ClientOption) (Client, error) {
|
||||
return internal.NewClient(target, opts...)
|
||||
|
||||
Reference in New Issue
Block a user