Documentation ¶
Index ¶
- type DelayHeap
- func (p *DelayHeap) Contains(heapNode HeapNode) bool
- func (p *DelayHeap) Length() int
- func (p *DelayHeap) Peek() *delayHeapNode
- func (p *DelayHeap) Pop() *delayHeapNode
- func (p *DelayHeap) Push(dataNode HeapNode, next time.Time) error
- func (p *DelayHeap) Remove(heapNode HeapNode) error
- func (p *DelayHeap) Update(heapNode HeapNode, waitUntil time.Time) error
- type HeapNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DelayHeap ¶
type DelayHeap struct {
// contains filtered or unexported fields
}
DelayHeap wraps a heap and gives operations other than Push/Pop. The inner heap is sorted by the time in the WaitUntil field of delayHeapNode
func NewDelayHeap ¶
func NewDelayHeap() *DelayHeap
type HeapNode ¶
type HeapNode interface { Data() interface{} // The data object ID() string // ID of the object, used in conjunction with namespace for deduplication Namespace() string // Namespace of the object, can be empty }
HeapNode is an interface type implemented by objects stored in the DelayHeap
Click to show internal directories.
Click to hide internal directories.