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) 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.
Click to show internal directories.
Click to hide internal directories.