Documentation ¶
Overview ¶
This file contains the timer manager struct and methods. A timer manager is used for handling a map of timers which perform a callback when they expire. They can be removed or renewed before they expire.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrTimerDoesNotExist = errors.New("timer does not exist")
Functions ¶
This section is empty.
Types ¶
type TimerMap ¶
type TimerMap struct {
// contains filtered or unexported fields
}
manager for a map of timers
func New ¶
func New() (*TimerMap, func())
New initializes a new timer manager with the provided onTimeoutFunc.
Returns a pointer to TimerMap and a closer function.
Click to show internal directories.
Click to hide internal directories.