retry

package
v0.0.0-...-a196a74 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Do

func Do(retries int, sleep time.Duration, toRetry RetryFunc) []error

Do invokes a function and if invocation fails retries defined amount of time with sleep in between Returns accumulated errors if all attempts failed or empty slice otherwise

Types

type RetryFunc

type RetryFunc func() error // nolint: golint

RetryFunc is a function type which wraps actual logic to be retried and returns error if that needs to happen

Jump to

Keyboard shortcuts

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