retry

package
v3.6.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2014 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RESET_AFTER time.Duration

RESET_AFTER is the duration of no-retry period (`Wait` was not called) after which retry stats will be resetted. Calling `Wait` after reset happens is effectively the same as calling `Wait` the very first time.

Functions

This section is empty.

Types

type ProgressiveRetryer

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

ProgressiveRetryer retries until a configurable limit (retryLimit), but with progressive delaysf (5secs -> 5mins) that resets itself after 20 minutes of no-retry.

func (*ProgressiveRetryer) Wait

func (retry *ProgressiveRetryer) Wait(msg string) bool

type Retryer

type Retryer interface {
	// Wait appropriately waits until next try
	Wait(msg string) bool
}

func NewProgressiveRetryer

func NewProgressiveRetryer(retryLimit time.Duration) Retryer

Jump to

Keyboard shortcuts

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