Documentation ¶
Overview ¶
Package retry allows multiple goroutines to function until it succeeds.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Retry ¶
type Retry struct {
// contains filtered or unexported fields
}
Retry is an object that will perform an action until it succeeds.
func (*Retry) Do ¶
Do calls f once and returns the result of f until f returns nil. Once f return nil, calling Do on this instance no longer calls f even if f changes but simply returns nil. Calling Do on this instance with multiple goroutines gates calls to f so that only only one goroutine at a time calls f while the others block.
Click to show internal directories.
Click to hide internal directories.