mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
client/v3: replace deprecated grpc.WithInsecure()
Deprecated: use WithTransportCredentials and insecure.NewCredentials() instead. Will be supported throughout 1.x. Signed-off-by: Ramil Mirhasanov <ramil600@yahoo.com>
This commit is contained in:
parent
2f558ca0db
commit
44d8e732cf
@ -32,6 +32,7 @@ import (
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
grpccredentials "google.golang.org/grpc/credentials"
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
"google.golang.org/grpc/keepalive"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
@ -231,7 +232,7 @@ func (c *Client) dialSetupOpts(creds grpccredentials.TransportCredentials, dopts
|
||||
if creds != nil {
|
||||
opts = append(opts, grpc.WithTransportCredentials(creds))
|
||||
} else {
|
||||
opts = append(opts, grpc.WithInsecure())
|
||||
opts = append(opts, grpc.WithTransportCredentials(insecure.NewCredentials()))
|
||||
}
|
||||
|
||||
// Interceptor retry and backoff.
|
||||
|
Loading…
x
Reference in New Issue
Block a user