package backoff

import "github.com/mesos/mesos-go/api/v1/lib/backoff"

Index

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.

Source Files

backoff.go

Version
v0.0.11 (latest)
Published
May 15, 2020
Platform
linux/amd64
Imports
3 packages
Last checked
5 hours ago

Tools for package owners.