retry

package
v0.0.0-...-389e7ce Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Retry

func Retry(attempts int, sleep time.Duration, f func() error) error

Retry retries func `f` `attempts` times with `sleep` between retries.

Types

type StopError

type StopError struct {
	// contains filtered or unexported fields
}

StopError is an error that will cause the retry loop to stop

func Stop

func Stop(err error) *StopError

Stop stops the retry with an error.

Jump to

Keyboard shortcuts

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