Documentation ¶
Overview ¶
Example ¶
package main import ( "fmt" "time" "github.com/DMarby/jitter" ) func main() { t := jitter.NewTicker( time.Second, time.Second*10, ) for tick := range t.C { fmt.Println("Tick at", tick) } }
Output:
Index ¶
Examples ¶
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 // Channel which the events are delivered on // contains filtered or unexported fields }
Ticker is a ticker that emits events on a channel at the given interval, with an added delay up to the defined max jitter If the receiever doesn't keep up the events will be discarded
Click to show internal directories.
Click to hide internal directories.