Documentation ¶
Overview ¶
Package jitter provides a random jitter
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Ticker ¶
Ticker is similar to time.Ticker but ticks at random intervals between the min and max duration values (stored internally as int64 nanosecond counts).
func NewTicker ¶
NewTicker returns a pointer to an initialized instance of the Ticker. Min and max are durations of the shortest and longest allowed ticks. Ticker will run in a goroutine until explicitly stopped.
func NewTickerContext ¶ added in v3.9.3
NewTickerContext returns a pointer to an initialized instance of the Ticker. It works like NewTicker except that it has ability to close via context. Also it works fine with context.WithTimeout to handle max time to run ticker.
Click to show internal directories.
Click to hide internal directories.