backoff

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backoff

type Backoff struct {
	Seq []int
}

Backoff represents a back-off strategy Seq represents a seqence of durations in seconds to backoff for

func (Backoff) Duration

func (b Backoff) Duration(n int) time.Duration

Duration returns a duration to backoff for given the step number n. The duration is jittered by +- 500ms

Jump to

Keyboard shortcuts

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