expb

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2015 License: Apache-2.0, MIT, MIT Imports: 4 Imported by: 0

README

exponential-backoff

Implementing exponential backoff

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExponentialBackOff

func ExponentialBackOff(bk *ExponentialBacker, cb Callback)

func ExponentialBackOffSync

func ExponentialBackOffSync(bk *ExponentialBacker) (interface{}, error)

Types

type Callback

type Callback func(result interface{}, err error)

type ExponentialBacker

type ExponentialBacker struct {
	Debug       bool
	Do          Producer
	RetryCount  uint32
	StatusCheck StatusChecker
}

func NewUrlGetter

func NewUrlGetter(url string, retryCount uint32) *ExponentialBacker

type Producer

type Producer func() (result interface{}, err error)

type StatusChecker

type StatusChecker func(q interface{}) (ok, retryable bool)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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