Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionRequester ¶
type ConnectionRequester struct { }
func NewConnectionRequester ¶
func NewConnectionRequester() *ConnectionRequester
NewConnectionRequester will return a ConnectionRequester. No connection will be requested until Start is called
func (*ConnectionRequester) Start ¶
func (cr *ConnectionRequester) Start()
Start will start requesting for a connection to be made.
func (*ConnectionRequester) Stop ¶
func (cr *ConnectionRequester) Stop()
Stop will stop requesting for a connection to be made.
func (*ConnectionRequester) WaitUntilUpLoop ¶
func (cr *ConnectionRequester) WaitUntilUpLoop( timeout time.Duration, retryAfter time.Duration, maxRetries int) error
WaitUntilUpLoop will wait until a connection has been made returning an error if no connection is made. timeout is the time given to make a connection each try. retryAfter is the duration between attempts, it will multipy by 1.5 after each try with a maximum of 2 hours. maxRetries is how many times it will try to make a connection. If -1 it will try until a connection is made.
Click to show internal directories.
Click to hide internal directories.