Skip to content

Commit

Permalink
Ignore Deprecation warning of grpc.WithBlocks()
Browse files Browse the repository at this point in the history
Signed-off-by: Masayuki Ishii <[email protected]>
  • Loading branch information
masa213f committed Jul 11, 2024
1 parent cb6d77e commit 4694590
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ func NewClient(c *Config) (*clientv3.Client, error) {
}

cfg := clientv3.Config{
Endpoints: c.Endpoints,
DialTimeout: timeout,
Endpoints: c.Endpoints,
DialTimeout: timeout,
//lint:ignore SA1019 etcd client requires to use grpc.WithBlocks()
// see https://etcd.io/docs/v3.4/upgrades/upgrade_3_4/#require-grpcwithblock-for-client-dial
DialOptions: []grpc.DialOption{grpc.WithBlock()},
DialKeepAliveTime: 10 * time.Second,
DialKeepAliveTimeout: 2 * timeout,
Expand Down

0 comments on commit 4694590

Please sign in to comment.