Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
fifo queue
func (*Queue) Next ¶
func (q *Queue) Next() (item interface{})
Remove the item at the head of the queue and return it. Returns nil when there are no items left in queue.
type UnsafeQueue ¶
type UnsafeQueue struct {
// contains filtered or unexported fields
}
fifo queue
func NewUnsafeQueue ¶
func NewUnsafeQueue() (q *UnsafeQueue)
NewUnsafeQueue creates a new and empty *fifo.UnsafeQueue
func (*UnsafeQueue) Add ¶
func (q *UnsafeQueue) Add(item interface{})
Add an item to the end of the queue
func (*UnsafeQueue) AddList ¶
func (q *UnsafeQueue) AddList(items []interface{})
Adds an list of items to the queue
func (*UnsafeQueue) Len ¶
func (q *UnsafeQueue) Len() (length int)
Return the number of items in the queue
func (*UnsafeQueue) Next ¶
func (q *UnsafeQueue) Next() (item interface{})
Remove the item at the head of the queue and return it. Returns nil when there are no items left in queue.
func (*UnsafeQueue) NextN ¶
func (q *UnsafeQueue) NextN(n int) []interface{}
Returns the next N elements from the queue In case of not enough elements, returns the elements that are available
func (*UnsafeQueue) Peek ¶
func (q *UnsafeQueue) Peek() (item interface{})
Reads the item at the head of the queue without removing it Returns nil when there are no items left in queue