MCPcopy
hub / github.com/grpc/grpc-go / withMinConnectDeadline

Function withMinConnectDeadline

dialoptions.go:742–746  ·  view source on GitHub ↗

withMinConnectDeadline specifies the function that clientconn uses to get minConnectDeadline. This can be used to make connection attempts happen faster/slower. For testing purpose only.

(f func() time.Duration)

Source from the content-addressed store, hash-verified

740//
741// For testing purpose only.
742func withMinConnectDeadline(f func() time.Duration) DialOption {
743 return newFuncDialOption(func(o *dialOptions) {
744 o.minConnectTimeout = f
745 })
746}
747
748// withDefaultScheme is used to allow Dial to use "passthrough" as the default
749// name resolver, while NewClient uses "dns" otherwise.

Calls 1

newFuncDialOptionFunction · 0.85