Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigInfo ¶
type ConfigInfo interface {
GetName() string
}
Data the queue will hold In order to evaluate equivalence, the Name must be unique
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
Queue uses slice as a data structure to hold elements new elements are appended as a last indexes in the slice meaning the oldest entries (First in) are at the start of the slice Queue is also thread safe and support usage over multiple goroutines
func (*Queue) CompareContent ¶
func (*Queue) Contains ¶
func (q *Queue) Contains(element ConfigInfo) bool
Contains checks if the queue holds the specified element returns true if element found, based on the Name, false if no element has the same Name
func (*Queue) Dequeue ¶
func (q *Queue) Dequeue() ConfigInfo
Dequeue will delete oldest element in the queue and return it returns nil if queue empty
func (*Queue) Enqueue ¶
func (q *Queue) Enqueue(element ConfigInfo)
Enqueue will add a new element into the end of the queue
func (*Queue) GetContent ¶
GetContent returns names of the items in the queue returns slice of names of the elements in the queue