retry

package
v0.0.0-...-bf90f01 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2020 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 ToRetry) chan 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 ToRetry

type ToRetry func() error // nolint: golint

ToRetry 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
JackTT - Gopher 🇻🇳