Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidDuration = errors.New("duration must greater than interval") ErrInvalidTask = errors.New("invalid task") )
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(tw *TimingWheel)
type Queue ¶
type Queue[T any] struct { // contains filtered or unexported fields }
A Queue is a FIFO queue.
type Ring ¶
type Ring[T any] struct { // contains filtered or unexported fields }
A Ring can be used as fixed size ring.
type Set ¶
type Set[T comparable] struct { // contains filtered or unexported fields }
type TimingWheel ¶
type TimingWheel struct {
// contains filtered or unexported fields
}
func NewTimingWheel ¶
func NewTimingWheel(slots int, tickInterval time.Duration) *TimingWheel
NewTimingWheel creates new TimingWheel
Click to show internal directories.
Click to hide internal directories.