Skip to content

Commit

Permalink
fix: get rid of using deprecated grpc.DialContext
Browse files Browse the repository at this point in the history
dabe62de7c7b06c70672ad8c8a37b018da611e9f
  • Loading branch information
kabachook committed May 24, 2024
1 parent e036d2c commit aee18d5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions plugin/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,11 @@ func (c *Client) Sync(ctx context.Context, options plugin.SyncOptions, res chan<

stateClient := state.Client(&state.NoOpClient{})
if options.BackendOptions != nil {
conn, err := grpc.DialContext(ctx, options.BackendOptions.Connection,
grpc.WithTransportCredentials(insecure.NewCredentials()),
conn, err := grpc.NewClient(options.BackendOptions.Connection, grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithDefaultCallOptions(
grpc.MaxCallRecvMsgSize(maxMsgSize),
grpc.MaxCallSendMsgSize(maxMsgSize),
),
)
))
if err != nil {
return fmt.Errorf("dial grpc source plugin at %s: %w", options.BackendOptions.Connection, err)
}
Expand Down

0 comments on commit aee18d5

Please sign in to comment.