Skip to content

Commit

Permalink
client/v3: replace deprecated grpc.WithInsecure()
Browse files Browse the repository at this point in the history
Deprecated: use WithTransportCredentials and insecure.NewCredentials() instead. Will be supported throughout 1.x.

Signed-off-by: Ramil Mirhasanov <[email protected]>
  • Loading branch information
ramil600 committed Nov 11, 2022
1 parent 2f558ca commit 44d8e73
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/v3/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 44d8e73

Please sign in to comment.