retry

package
v1.12.3 Latest Latest
Warning

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

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

Documentation

Overview

Package retry implements wrappers to retry function calls

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.

func Local added in v1.12.0

func Local(callback func() error, maxTime time.Duration) error

Local is back-off retry for local connections

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