backoff

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: May 15, 2020 License: Apache-2.0 Imports: 3 Imported by: 21

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BurstNotifier

func BurstNotifier(burst int, minWait, maxWait time.Duration, until <-chan struct{}) <-chan struct{}

func Notifier

func Notifier(minWait, maxWait time.Duration, until <-chan struct{}) <-chan struct{}

Notifier returns a chan that yields a struct{}{} every so often. the wait period between structs is between minWait and maxWait. greedy consumers that continuously read from the returned chan will see the wait period generally increase.

Note: this func panics if minWait is a non-positive value to avoid busy-looping.

Types

This section is empty.

Jump to

Keyboard shortcuts

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