Documentation
¶
Overview ¶
Package pollqueue provides fair round-robin polling with a bounded manual priority lane for operator-triggered refreshes.
Index ¶
Constants ¶
View Source
const ( // StatusNotSampled marks values that are known to the queue but have not // returned from the poll loop yet. StatusNotSampled = "not_sampled" // MaxManualBurst is the number of front-lane emissions allowed before a // normal item must be considered when normal work is queued. MaxManualBurst = 1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Queue ¶
Queue rotates normal items in bulk-friendly chunks. EnqueueFront inserts a one-shot manual request ahead of normal rotation while preserving normal scheduler fairness.
func (*Queue[T, V]) Enqueue ¶
func (q *Queue[T, V]) Enqueue(item T)
Enqueue adds a normal round-robin item if it is not already queued.
func (*Queue[T, V]) EnqueueFront ¶
func (q *Queue[T, V]) EnqueueFront(item T)
EnqueueFront adds a one-shot manual item to the front lane. Repeated manual requests for the same key collapse to one pending front-lane item.
func (*Queue[T, V]) Latest ¶
Latest returns the freshest known result for item, including not-sampled placeholders seeded by Enqueue and EnqueueFront.
Click to show internal directories.
Click to hide internal directories.