Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SwapTimeouts ¶
for testing: change the default timeouts for the provided ones, returning the defaults (the idea being you reset them on test teardown)
Types ¶
type AutoRedialer ¶
type AutoRedialer interface { Redial() uint32 // Redial keeps on calling Dial until it stops returning an error. Stop() // Stop shuts down the given AutoRedialer, if it is still retrying. }
An AutoRedialer's Redial() method retries its dialer's Dial() method until it stops returning an error. It does exponential (optionally jitter'ed) backoff.
func NewAutoRedialer ¶
func NewAutoRedialer(dialer Dialer) AutoRedialer
returns a stoppable AutoRedialer using the provided Dialer. If the Dialer is also a Jitterer, the backoff will be jittered.
Click to show internal directories.
Click to hide internal directories.