mirror of https://github.com/grpc/grpc-go.git
godoc: clarify WithTimeout deprecation note (#3226)
Tell people to replace Dial + WithTimeout with DialContext + context.WithTimeout.
This commit is contained in:
parent
cb0e11b54f
commit
032a3799b2
|
|
@ -346,8 +346,8 @@ func WithCredentialsBundle(b credentials.Bundle) DialOption {
|
||||||
// WithTimeout returns a DialOption that configures a timeout for dialing a
|
// WithTimeout returns a DialOption that configures a timeout for dialing a
|
||||||
// ClientConn initially. This is valid if and only if WithBlock() is present.
|
// ClientConn initially. This is valid if and only if WithBlock() is present.
|
||||||
//
|
//
|
||||||
// Deprecated: use DialContext and context.WithTimeout instead. Will be
|
// Deprecated: use DialContext instead of Dial and context.WithTimeout
|
||||||
// supported throughout 1.x.
|
// instead. Will be supported throughout 1.x.
|
||||||
func WithTimeout(d time.Duration) DialOption {
|
func WithTimeout(d time.Duration) DialOption {
|
||||||
return newFuncDialOption(func(o *dialOptions) {
|
return newFuncDialOption(func(o *dialOptions) {
|
||||||
o.timeout = d
|
o.timeout = d
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue