retry

package
v1.1.27 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Do

func Do(attempts int, sleep time.Duration, fn func() error) error

Do Performs repeated calls with a time delay for specific number of attempts or till the function returns no error Return Stop{err}, if you want to stop despite Error

Types

type Stop

type Stop struct {
	OriginalError error
}

Stop is used to return error and stop retrying Return Stop{err}, if you want to stop despite Error

func (Stop) Error added in v0.0.18

func (stop Stop) Error() string

Jump to

Keyboard shortcuts

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