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

Function WithTimeout

dialoptions.go:472–476  ·  view source on GitHub ↗

WithTimeout returns a DialOption that configures a timeout for dialing a ClientConn initially. This is valid if and only if WithBlock() is present. Deprecated: this DialOption is not supported by NewClient. Will be supported throughout 1.x.

(d time.Duration)

Source from the content-addressed store, hash-verified

470// Deprecated: this DialOption is not supported by NewClient.
471// Will be supported throughout 1.x.
472func WithTimeout(d time.Duration) DialOption {
473 return newFuncDialOption(func(o *dialOptions) {
474 o.timeout = d
475 })
476}
477
478// WithContextDialer returns a DialOption that sets a dialer to create
479// connections. If FailOnNonTempDialError() is set to true, and an error is

Callers 2

TestDialWithTimeoutMethod · 0.85
TestWithTimeoutMethod · 0.85

Calls 1

newFuncDialOptionFunction · 0.85

Tested by 2

TestDialWithTimeoutMethod · 0.68
TestWithTimeoutMethod · 0.68