MCPcopy Index your code
hub / github.com/coder/coder / NewQueue

Function NewQueue

agent/proto/resourcesmonitor/queue.go:35–40  ·  view source on GitHub ↗

newQueue creates a new Queue with the given size

(size int)

Source from the content-addressed store, hash-verified

33
34// newQueue creates a new Queue with the given size
35func 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
43func (q *Queue) Push(item Datapoint) {

Callers 2

TestResourceMonitorQueueFunction · 0.92
NewResourcesMonitorFunction · 0.70

Calls

no outgoing calls

Tested by 1

TestResourceMonitorQueueFunction · 0.74