utils

package
v0.0.8-dev Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2017 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsMaxRetries

func IsMaxRetries(err error) bool

IsMaxRetries checks whether the error is due to hitting the maximum number of retries or not.

func Retry

func Retry(fn Func, maxRetries int) error

Retry keeps trying the function until the second argument returns false, or no error is returned.

Types

type Func

type Func func(attempt int) (retry bool, err error)

Func represents functions that can be retried.

Jump to

Keyboard shortcuts

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