retry

package
v1.6.0-beta.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Expo

func Expo(callback func() error, initInterval time.Duration, maxTime time.Duration, maxRetries ...uint64) error

Expo is exponential backoff retry. initInterval is the initial waiting time to start with. maxTime is the max time allowed to spend on the all the retries. maxRetries is the optional max number of retries allowed with default of 13.

Types

type RetriableError

type RetriableError struct {
	Err error
}

RetriableError is an error that can be tried again

func (RetriableError) Error

func (r RetriableError) Error() string

Jump to

Keyboard shortcuts

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