retry

package
v0.0.0-...-7d5e071 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultBackoffFunc = func(attempts int) {
	time.Sleep((1 << uint(attempts)) * time.Second)
}

Functions

This section is empty.

Types

type Retry

type Retry struct {
	// contains filtered or unexported fields
}

func New

func New(maxAttempts int, backoffFunc func(int)) Retry

func (Retry) Try

func (r Retry) Try(work func() error) error

Jump to

Keyboard shortcuts

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