cmd/dist: add global connect-timeout for GRPC
Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
parent
317b884110
commit
d61d0b5aef
3 changed files with 9 additions and 4 deletions
2
cmd/dist/common.go
vendored
2
cmd/dist/common.go
vendored
|
@ -24,7 +24,9 @@ func resolveContentStore(context *cli.Context) (*content.Store, error) {
|
|||
|
||||
func connectGRPC(context *cli.Context) (*grpc.ClientConn, error) {
|
||||
socket := context.GlobalString("socket")
|
||||
timeout := context.GlobalDuration("connect-timeout")
|
||||
return grpc.Dial(socket,
|
||||
grpc.WithTimeout(timeout),
|
||||
grpc.WithBlock(),
|
||||
grpc.WithInsecure(),
|
||||
grpc.WithDialer(func(addr string, timeout time.Duration) (net.Conn, error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue