package
1.0.30
Repository: https://github.com/dunv/connectiontools.git
Documentation: pkg.go.dev

# Functions

Create a new ReadCallbackConn.
Use exponential backoff when connecting.
No description provided by the author
Define a maximum time that the read-call waits when pushing into the channel When the timeout is exceeded two possibilities exist: - continue with reading as if nothing happened - cancel all running routines, close channel (default).
Pass a context which is checked by every Connect and Read Cancelling this context can be used to cancel all running routines.
No description provided by the author
Check every error that the Connect(ctx context.Context) method returns if the error is considered permanent (default: all errors are transient) the connection will be stopped alltogether.
Check every error that the Read(ctx context.Context) method returns if the error is considered permanent (default, if this handler is not passed) the connection will be disconnected and retried if the error is transient, the response will be skipped and another Read is called.
No description provided by the author
No description provided by the author
No description provided by the author
Use exponential backoff when reading.
No description provided by the author

# Variables

No description provided by the author

# Structs

ReadCallbackConn is a wrapper for a connection with a read-callback it will - connect (with exponential backoff if wanted) - read (with exponential backoff if wanted) - pass read data out via channel until a permanent connect-error is encountered.

# Interfaces

ReadCallbackConnection is the interface that a connection must implement in order to be used with the ReadCallbackConn wrapper.
No description provided by the author