WithContextDialer returns a DialOption that sets a dialer to create connections. If FailOnNonTempDialError() is set to true, and an error is returned by f, gRPC checks the error's Temporary() method to decide if it should try to reconnect to the network address. Note that gRPC by default performs n
(f func(context.Context, string) (net.Conn, error))
| 496 | // |
| 497 | // [issue 23459]: https://github.com/golang/go/issues/23459 |
| 498 | func WithContextDialer(f func(context.Context, string) (net.Conn, error)) DialOption { |
| 499 | return newFuncDialOption(func(o *dialOptions) { |
| 500 | o.copts.Dialer = f |
| 501 | }) |
| 502 | } |
| 503 | |
| 504 | // WithDialer returns a DialOption that specifies a function to use for dialing |
| 505 | // network addresses. If FailOnNonTempDialError() is set to true, and an error |