func (oq *OrderQueue) Size() int64 {
	return int64(len(oq.values))
}
Size returns the size of orders in the queue.
package queue
import "github.com/draveness/oceanbook/pkg/order"
type OrderQueue struct {
	size   int64
	values []*order.Order
}
func NewOrderQueue(size int64) OrderQueue {
	return OrderQueue{
		size:   size,
		values: make([]*order.Order, 0, size),
	}
}
func (oq *OrderQueue) Push(o *order.Order) {
	oq.values = append(oq.values, o)
}
func (oq *OrderQueue) First() *order.Order {
	if oq.Size() <= 0 {
		return nil
	}
	return oq.values[0]
}
func (oq *OrderQueue) Pop() *order.Order {
	if oq.Size() <= 0 {
		return nil
	}
	o := oq.values[0]
	oq.values = oq.values[1:]
	return o
}
func (oq *OrderQueue) Clear() {
	oq.values = make([]*order.Order, 0, oq.size)
}
func (oq *OrderQueue) Values() []*order.Order {
	return oq.values
}