expb

package
Version: v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2016 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