queue

package
v0.0.0-...-a7768ee Latest Latest
Warning

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

Go to latest
Published: May 26, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OrderQueue

type OrderQueue struct {
	// contains filtered or unexported fields
}

OrderQueue is the FIFO queue to store orders.

func NewOrderQueue

func NewOrderQueue(size int64) OrderQueue

NewOrderQueue returns an order queue.

func (*OrderQueue) Clear

func (oq *OrderQueue) Clear()

Clear removes all orders.

func (*OrderQueue) First

func (oq *OrderQueue) First() *order.Order

First returns the first order in order queue.

func (*OrderQueue) Pop

func (oq *OrderQueue) Pop() *order.Order

Pop removes and returns the first order in the order queue.

func (*OrderQueue) Push

func (oq *OrderQueue) Push(o *order.Order)

Push appends an order to the end of order queue.

func (*OrderQueue) Size

func (oq *OrderQueue) Size() int64

Size returns the size of orders in the queue.

func (*OrderQueue) Values

func (oq *OrderQueue) Values() []*order.Order

Values returns all orders.

Jump to

Keyboard shortcuts

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