Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ticker ¶
type Ticker struct {
// contains filtered or unexported fields
}
Ticker is a wrapper around time.Ticker that allows to manually invoke a tick and can be stopped via context.
func NewTicker ¶
NewTicker returns a new Ticker instance. If d is 0, the ticker will not be started and only manual ticks will be possible.
func (*Ticker) Tick ¶
func (t *Ticker) Tick()
Tick sends a tick to the ticker channel. Ticker must be started before calling this method.
type VarTicker ¶ added in v0.13.10
type VarTicker struct {
// contains filtered or unexported fields
}
VarTicker is a wrapper around time.Ticker that allows to manually invoke a tick and can be stopped via context.
It allows to specify multiple durations. The ticker will tick at the specified durations and then repeat the last duration.
func NewVarTicker ¶ added in v0.13.10
NewVarTicker returns a new VarTicker instance.
func (*VarTicker) Tick ¶ added in v0.13.10
func (t *VarTicker) Tick()
Tick sends a tick to the ticker channel. Ticker must be started before calling this method.