backoff

package
v2.15.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package backoff implement the backoff strategy for reconnecting to server, or for restarting Agents.

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
}

Backoff encapsulates delay manipulation.

func New

func New(min, max time.Duration) *Backoff

New returns new reset backoff.

func (*Backoff) Delay

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

Delay returns next delay.

func (*Backoff) Reset

func (b *Backoff) Reset()

Reset sets next delay to the default minimum.

Jump to

Keyboard shortcuts

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