connrequester

package
v1.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 3, 2023 License: GPL-3.0 Imports: 2 Imported by: 4

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL