backoff

package
v5.3.1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: Apache-2.0 Imports: 3 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Impl

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

Impl implements the Backoff interface

func New

func New(base int64, maxAllowed time.Duration) *Impl

New creates a new Backoffer

func (*Impl) Next

func (b *Impl) Next() time.Duration

Next returns how long to wait and updates the current count

func (*Impl) Reset

func (b *Impl) Reset()

Reset sets the current count to 0

type Interface

type Interface interface {
	Next() time.Duration
	Reset()
}

Interface is the backoff interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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