Documentation
¶
Index ¶
- type Chunk
- type TimeWheel
- func (this *TimeWheel) Add(interval int64, data interface{}, callBack TimeWheelCallBack) int32
- func (this *TimeWheel) AddCycle(interval int64, data interface{}, callBack TimeWheelCallBack) int32
- func (this *TimeWheel) Remove(id int32) bool
- func (this *TimeWheel) RemoveAll()
- func (this *TimeWheel) Size() int32
- func (this *TimeWheel) Step(current int64)
- func (this *TimeWheel) StepOne()
- func (this *TimeWheel) String() string
- type TimeWheelAllocator
- type TimeWheelAllocatorStat
- type TimeWheelCallBack
- type TimeWheelStat
- type TimeWheelTaskData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TimeWheel ¶
type TimeWheel struct {
// contains filtered or unexported fields
}
func NewTimeWheel ¶
func NewTimeWheelBinaryBits ¶
func (*TimeWheel) Add ¶
func (this *TimeWheel) Add(interval int64, data interface{}, callBack TimeWheelCallBack) int32
type TimeWheelAllocator ¶
type TimeWheelAllocator struct { Chunks []Chunk // contains filtered or unexported fields }
func NewTimeWheelAllocator ¶
func NewTimeWheelAllocator(capacity int32) *TimeWheelAllocator
func (*TimeWheelAllocator) Alloc ¶
func (this *TimeWheelAllocator) Alloc() int32
func (*TimeWheelAllocator) AllocEx ¶
func (this *TimeWheelAllocator) AllocEx() *Chunk
func (*TimeWheelAllocator) Free ¶
func (this *TimeWheelAllocator) Free(id int32)
func (*TimeWheelAllocator) FreeAll ¶
func (this *TimeWheelAllocator) FreeAll()
type TimeWheelAllocatorStat ¶
type TimeWheelCallBack ¶
type TimeWheelCallBack func(val interface{})
type TimeWheelStat ¶
type TimeWheelStat struct { Add uint64 AddOk uint64 InternalAdd uint64 InternalAddOk uint64 Remove uint64 RemoveOk uint64 InternalRemove uint64 InternalRemoveOk uint64 Step uint64 Expire uint64 ExpireBeforeAdd uint64 Post uint64 RemoveAll uint64 MoveWheels uint64 MoveSlot uint64 }
func (*TimeWheelStat) Clear ¶
func (this *TimeWheelStat) Clear()
type TimeWheelTaskData ¶
type TimeWheelTaskData struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.