retry

package
v0.1.15 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Do

func Do(maxTime time.Duration, interval time.Duration, f Func) bool

Do retries provided function until maxTime is reached, using provided interval as a delay and returning true if it's successfully completed

func Do2 added in v0.1.11

func Do2(maxTime time.Duration, maxInterval time.Duration, f Func) bool

Do2 retries provided until maxTime is reached, doubling the delay interval until it reaches the maxInterval and returning true if it's successfully completed

Types

type Func

type Func = func() bool

Func is the function to retry returning true if it's successfully completed

Jump to

Keyboard shortcuts

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