Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Retry ¶
Retry is a concurrency safe retry structure that configures a simple backoff retry mechanism
func (*Retry) Do ¶
func (r *Retry) Do(ctx context.Context, logDescription string, f func(attempt int) (retry bool, err error)) error
Do invokes the function until the function returns false, or the retry pops. This simple interface doesn't pass through errors or return values, on the basis you'll be using a closure for that.
Click to show internal directories.
Click to hide internal directories.