queue

package
v0.0.0-...-91b6c6a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2024 License: GPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventAppend  = event.EventType("APPEND")
	EventRemove  = event.EventType("REMOVE")
	EventShuffle = event.EventType("SHUFFLE")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EventAppendData

type EventAppendData struct {
	Items  []*QueueEntry
	Queue  *Queue
	Index  int
	IsMany bool
}

type EventRemoveData

type EventRemoveData struct {
	Queue *Queue
	Index int
	Item  *QueueEntry
}

type Queue

type Queue struct {
	*event.EventEmitter
	// contains filtered or unexported fields
}

func NewQueue

func NewQueue() *Queue

func (*Queue) All

func (q *Queue) All() []*QueueEntry

func (*Queue) Append

func (q *Queue) Append(item *QueueEntry)

func (*Queue) AppendAt

func (q *Queue) AppendAt(index int, item *QueueEntry)

func (*Queue) AppendMany

func (q *Queue) AppendMany(items ...*QueueEntry)

func (*Queue) Clear

func (q *Queue) Clear()

func (*Queue) First

func (q *Queue) First() *QueueEntry

func (*Queue) ItemAt

func (q *Queue) ItemAt(index int) *QueueEntry

func (*Queue) Remove

func (q *Queue) Remove(index int)

func (*Queue) Shuffle

func (q *Queue) Shuffle()

func (*Queue) Size

func (q *Queue) Size() int

type QueueEntry

type QueueEntry struct {
	Playable  playable.Playable
	Requester string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL