Documentation ¶
Overview ¶
Package retry contains utilities for performing retries when functions return errors.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Do ¶
Do performs an action with a maximum number of retries. If fn returns a non-nil error, it will be retried up to the maximum number of times and then returned. If fn returns a nil error, the retry loop is broken. The loop is also broken if the provided context is cancelled. Returning an error wrapped with the Stop function will prevent further retries from occurring.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.