backoff

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2025 License: MIT Imports: 4 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 {
	// contains filtered or unexported fields
}

func NewBackoff

func NewBackoff(opts *Options) *Backoff

func (*Backoff) Attempts

func (b *Backoff) Attempts() float64

func (*Backoff) Duration

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

func (*Backoff) Reset

func (b *Backoff) Reset()

type Options

type Options struct {
	Min    time.Duration
	Max    time.Duration
	Jitter float64
	Factor float64
}

Jump to

Keyboard shortcuts

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