Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
Option is a function type used to set Options
func WithContainer ¶
WithContainer is used to set a Queue's underlying container
func WithGoroutineSafe ¶
WithGoroutineSafe is used to set a Queue goroutine-safe
func WithListContainer ¶
WithListContainer is used to set List as a Queue's underlying container
type Options ¶
type Options[T any] struct { // contains filtered or unexported fields }
Options holds Queue's options
type Queue ¶
type Queue[T any] struct { // contains filtered or unexported fields }
Queue is a first-in-first-out data structure
func (*Queue[T]) Pop ¶
func (q *Queue[T]) Pop() T
Pop removes the the front element in the queue, and returns its value
func (*Queue[T]) Push ¶
func (q *Queue[T]) Push(value T)
Push pushes a value to the end of the queue
Click to show internal directories.
Click to hide internal directories.