WithConnectParams configures the ClientConn to use the provided ConnectParams for creating and maintaining connections to servers. The backoff configuration specified as part of the ConnectParams overrides all defaults specified in https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md.
(p ConnectParams)
| 322 | // using the backoff.DefaultConfig as a base, in cases where you want to |
| 323 | // override only a subset of the backoff configuration. |
| 324 | func WithConnectParams(p ConnectParams) DialOption { |
| 325 | return newFuncDialOption(func(o *dialOptions) { |
| 326 | o.bs = internalbackoff.Exponential{Config: p.Backoff} |
| 327 | o.minConnectTimeout = func() time.Duration { |
| 328 | return p.MinConnectTimeout |
| 329 | } |
| 330 | }) |
| 331 | } |
| 332 | |
| 333 | // WithBackoffMaxDelay configures the dialer to use the provided maximum delay |
| 334 | // when backing off after failed connection attempts. |