Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RetryForError ¶
func RetryForError(ctx context.Context, do func() error, shouldRetry func(error) time.Duration, retries int, logger log.Logger) error
RetryForError call do() and retry max `retries` count if do() returns a error, and shouldRetry(err) returns a duration. returns the error if do() returns a non retryable error.
Types ¶
Click to show internal directories.
Click to hide internal directories.