domain

package
v0.0.0-...-8757257 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2021 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Counter

type Counter struct {
	Id int
	// contains filtered or unexported fields
}

func (*Counter) PeopleIDs

func (c *Counter) PeopleIDs() []int

func (*Counter) Process

func (c *Counter) Process(p *Person)

type Person

type Person struct {
	Id    int
	Items int
}

type Queue

type Queue struct {
	Lock *sync.Mutex
	// contains filtered or unexported fields
}

func (*Queue) Init

func (q *Queue) Init(p []*Person, m *sync.Mutex)

func (*Queue) NumberOfPeople

func (q *Queue) NumberOfPeople() int

NumberOfPeople returns the number of people in our queue

func (*Queue) Pop

func (q *Queue) Pop() *Person

Pop will remove the top element from the queue and return it

func (*Queue) Push

func (q *Queue) Push(person *Person)

Push adds an element at the end of the existing queue

Jump to

Keyboard shortcuts

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