Documentation ¶
Overview ¶
Package retry provides a mechanism to execute a function with retry logic.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Do ¶
Do implements retry using fibonacci backoff, up to a total execution time of maxDuration. The retry impl is mostly handled by the sethvargo/go-retry package. The matched args are tested against the error returned by fn; if the error message contains any of matches, retry can be performed.
err = retry.Do(ctx, time.Second*5, loadDataFn, "not found", "timeout")
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.