Skip to content

Commit

Permalink
Merge pull request #36 from howardjohn/patch-1
Browse files Browse the repository at this point in the history
Make Istio client compatible with grpc 1.42+
  • Loading branch information
ProsaicSatsuma committed Feb 5, 2022
2 parents ed9f7fe + cd14b9b commit 68806ed
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions apis/istio/v1/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,12 @@ func GetClientTCP(host string, port int64, timeout time.Duration) (ctx context.C
c = NewKeyManagementServiceClient(conn)
return
}

func GetClientSocket(socket string, timeout time.Duration) (ctx context.Context, cancel context.CancelFunc, c KeyManagementServiceClient, err error) {
// Get Client
options := []grpc.DialOption{grpc.WithInsecure()}
var conn *grpc.ClientConn
u := &url.URL{
Scheme: "unix",
Path: socket,
}
if conn, err = grpc.Dial(u.String(), options...); err != nil {
if conn, err = grpc.Dial("unix:"+socket, options...); err != nil {
return
}

Expand Down

0 comments on commit 68806ed

Please sign in to comment.