retry

package
v0.0.0-...-0cfc503 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package retry provides methods for retrying operations. It is a thin wrapper around k8s.io/apimachinery/pkg/util/wait to make certain operations easier.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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.

Types

type Predicate

type Predicate func(error) (retry bool)

Predicate determines whether an error should be retried.

Jump to

Keyboard shortcuts

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