WithIdleTimeout returns a DialOption that configures an idle timeout for the channel. If the channel is idle for the configured timeout, i.e there are no ongoing RPCs and no new RPCs are initiated, the channel will enter idle mode and as a result the name resolver and load balancer will be shut down
(d time.Duration)
| 783 | // Notice: This API is EXPERIMENTAL and may be changed or removed in a |
| 784 | // later release. |
| 785 | func WithIdleTimeout(d time.Duration) DialOption { |
| 786 | return newFuncDialOption(func(o *dialOptions) { |
| 787 | o.idleTimeout = d |
| 788 | }) |
| 789 | } |
| 790 | |
| 791 | // WithMaxCallAttempts returns a DialOption that configures the maximum number |
| 792 | // of attempts per call (including retries and hedging) using the channel. |