Documentation
¶
Overview ¶
Package stagger connects to the first of several addresses to accept the connection, without the one that does not answer holding the others: the connect to an address starts when the one to the previous address failed, or ran a delay, as a dual-stack client falls back from an address of a family the node can not reach.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dial ¶
Dial runs the attempts in order, each one starting when the previous one failed or ran delay, and returns the first connection established. The attempts still running are abandoned then: their context ends, and a connection they establish meanwhile is closed. It returns the error of the first attempt when none connects.