backoff

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backoff

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

Backoff is a quick retry function

func New

func New(opts ...Opt) *Backoff

New returns a Backoff timer

func (*Backoff) Run

func (b *Backoff) Run(runFunc func() error) error

Run trys to run function several times until it succeeds or times out.

type Opt

type Opt func(*Backoff)

func MaxAttempts

func MaxAttempts(i int) Opt

Jump to

Keyboard shortcuts

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