mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
functional-tester/rpcpb: support grpc.DialOption for "CreateEtcdClient"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
This commit is contained in:
parent
358a89c7e9
commit
a729b88463
@ -41,15 +41,17 @@ func (m *Member) DialEtcdGRPCServer(opts ...grpc.DialOption) (*grpc.ClientConn,
|
||||
}
|
||||
|
||||
// CreateEtcdClient creates a client from member.
|
||||
func (m *Member) CreateEtcdClient() (*clientv3.Client, error) {
|
||||
func (m *Member) CreateEtcdClient(opts ...grpc.DialOption) (*clientv3.Client, error) {
|
||||
cfg := clientv3.Config{
|
||||
Endpoints: []string{m.EtcdClientEndpoint},
|
||||
DialTimeout: 5 * time.Second,
|
||||
DialOptions: opts,
|
||||
}
|
||||
if m.EtcdClientTLS {
|
||||
// TODO: support TLS
|
||||
panic("client TLS not supported yet")
|
||||
}
|
||||
return clientv3.New(clientv3.Config{
|
||||
Endpoints: []string{m.EtcdClientEndpoint},
|
||||
DialTimeout: 5 * time.Second,
|
||||
})
|
||||
return clientv3.New(cfg)
|
||||
}
|
||||
|
||||
// CheckCompact ensures that historical data before given revision has been compacted.
|
||||
|
Loading…
x
Reference in New Issue
Block a user