retry

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithTimeout

func WithTimeout(timeout time.Duration, interval time.Duration, fn ConditionFunc) error

WithTimeout retries "fn" every "interval" until one of the following conditions are met: 1. "fn" evaluates to "true". 2. "fn" returns an error. 3. The specified timeout elapses.

Types

type ConditionFunc

type ConditionFunc func() (bool, error)

ConditionFunc represents a function that returns whether a given condition has been met, or an error.

Jump to

Keyboard shortcuts

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