Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Conf *jconfig.Config
Functions ¶
This section is empty.
Types ¶
type MatchQueue ¶
type MatchQueue struct {
// contains filtered or unexported fields
}
A go-routine safe FIFO (first in first out) data stucture.
func (*MatchQueue) Len ¶
func (q *MatchQueue) Len() int
Returns the number of elements in the queue (i.e. size/length) go-routine safe.
func (*MatchQueue) Peek ¶
func (q *MatchQueue) Peek() *models.Player
Returns a read value at the front of the queue. i.e. the oldest value in the queue. Note: this function does NOT mutate the queue. go-routine safe.
func (*MatchQueue) Poll ¶
func (q *MatchQueue) Poll() *models.Player
Returns the value at the front of the queue. i.e. the oldest value in the queue. Note: this function does mutate the queue. go-routine safe.
func (*MatchQueue) PollInsert ¶
func (q *MatchQueue) PollInsert(player *models.Player) *models.Player
Adds to queue only if que is empty, otherwise returns leading value
func (*MatchQueue) Push ¶
func (q *MatchQueue) Push(player *models.Player)
Pushes/inserts a value at the end/tail of the queue. Note: this function does mutate the queue. go-routine safe.
Click to show internal directories.
Click to hide internal directories.