newQueue creates a new Queue with the given size
(size int)
| 33 | |
| 34 | // newQueue creates a new Queue with the given size |
| 35 | func NewQueue(size int) *Queue { |
| 36 | return &Queue{ |
| 37 | items: make([]Datapoint, 0, size), |
| 38 | size: size, |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | // Push adds a new item to the queue |
| 43 | func (q *Queue) Push(item Datapoint) { |
no outgoing calls