backoff

package
v0.0.0-...-692e367 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 3 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 {

	// Factor are the multiplication factor
	Factor float64
	// Min and Max are the minimum and maximum counter values.
	Min, Max time.Duration
	// contains filtered or unexported fields
}

func (*Backoff) Attempt

func (b *Backoff) Attempt() float64

func (*Backoff) Duration

func (b *Backoff) Duration() time.Duration

func (*Backoff) ForAttempt

func (b *Backoff) ForAttempt(attempt float64) time.Duration

func (*Backoff) Reset

func (b *Backoff) Reset()

Jump to

Keyboard shortcuts

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