expb

package module
v0.0.0-...-96e25d3 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2015 License: MIT Imports: 4 Imported by: 27

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