jitter

package
v1.11.0-cni-plu...-7acfd45 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: Apache-2.0, Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ticker

type Ticker struct {
	C <-chan time.Time

	MinDuration time.Duration
	MaxJitter   time.Duration
	// contains filtered or unexported fields
}

Ticker tries to emit events on channel C at minDuration intervals plus up to maxJitter.

func NewTicker

func NewTicker(minDuration time.Duration, maxJitter time.Duration) *Ticker

func (*Ticker) Channel

func (t *Ticker) Channel() <-chan time.Time

func (*Ticker) Done

func (t *Ticker) Done() chan bool

func (*Ticker) Stop

func (t *Ticker) Stop()

type TickerInterface

type TickerInterface interface {
	Stop()
	Channel() <-chan time.Time
	Done() chan bool
}

Jump to

Keyboard shortcuts

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