backoff

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultBackoff = ExponentialBackoff{minBackoff, maxBackoff}

Functions

This section is empty.

Types

type ExponentialBackoff

type ExponentialBackoff struct {
	Min, Max time.Duration
}

func (ExponentialBackoff) Delay

func (b ExponentialBackoff) Delay(retries int) time.Duration

delay calculates the delay that should happen at n-th exponential backoff in a series.

Jump to

Keyboard shortcuts

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