Documentation ¶ Index ¶ Constants func Do(attempts int, delay time.Duration, fn func() error, name string) error Constants ¶ View Source const RetryDelay = 2 * time.Second Variables ¶ This section is empty. Functions ¶ func Do ¶ func Do(attempts int, delay time.Duration, fn func() error, name string) error Do calls fn up to attempts times, waiting delay between tries. name to identifies what's being retried in the log line. Returns nil on first success, or the last error if every attempt fails. Types ¶ This section is empty. Source Files ¶ View all Source files retry.go Click to show internal directories. Click to hide internal directories.