v0.7.0 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2021 License: Apache-2.0 Imports: 3 Imported by: 0



Package retry provides methods for retrying operations. It is a thin wrapper around to make certain operations easier.



This section is empty.


This section is empty.


func IsNotNil

func IsNotNil(err error) bool

IsNotNil returns true if err is not nil.

func IsTemporary

func IsTemporary(err error) bool

IsTemporary returns true if err implements Temporary() and it returns true.

func Retry

func Retry(f func() error, p Predicate, backoff wait.Backoff) (err error)

Retry retries a given function, f, until a predicate is satisfied, using exponential backoff. If the predicate is never satisfied, it will return the last error returned by f.


type Backoff

type Backoff = wait.Backoff

Backoff is an alias of our own wait.Backoff to avoid name conflicts with the kubernetes wait package. Typing retry.Backoff is aesier than fixing the wrong import every time you use wait.Backoff.

type Predicate

type Predicate func(error) (retry bool)

Predicate determines whether an error should be retried.


Path Synopsis
Package wait is a subset of to avoid conflicts in dependencies (specifically, logging).
Package wait is a subset of to avoid conflicts in dependencies (specifically, logging).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL