withBackoff sets the backoff strategy used for connectRetryNum after a failed connection attempt. This can be exported if arbitrary backoff strategies are allowed by gRPC.
(bs internalbackoff.Strategy)
| 353 | // |
| 354 | // This can be exported if arbitrary backoff strategies are allowed by gRPC. |
| 355 | func withBackoff(bs internalbackoff.Strategy) DialOption { |
| 356 | return newFuncDialOption(func(o *dialOptions) { |
| 357 | o.bs = bs |
| 358 | }) |
| 359 | } |
| 360 | |
| 361 | // WithBlock returns a DialOption which makes callers of Dial block until the |
| 362 | // underlying connection is up. Without this, Dial returns immediately and |