Documentation ¶
Overview ¶
Package boltqueue provides a persistent queue or priority queue based on boltdb (https://github.com/boltdb/bolt)
Priority Queue ¶
boltqueue's PQueue type represents a priority queue. Messages may be inserted into the queue at a numeric priority between 0(highest) and 255(lowest). Messages are dequeued following priority order, then time ordering, with the oldest messages of the highest priority emerging first.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
Message represents a message in the priority queue
func NewMessage ¶
NewMessage generates a new priority queue message
type PQueue ¶
type PQueue struct {
// contains filtered or unexported fields
}
PQueue is a priority queue backed by a Bolt database on disk
func (*PQueue) Dequeue ¶
Dequeue removes the oldest, highest priority message from the queue and returns it