MCPcopy Create free account
hub / github.com/rabbitstack/fibratus / NewQueue

Function NewQueue

pkg/event/queue.go:54–63  ·  view source on GitHub ↗

NewQueue constructs a new queue with the given channel size.

(size int, stackEnrichment bool, enqueueAlways bool)

Source from the content-addressed store, hash-verified

52
53// NewQueue constructs a new queue with the given channel size.
54func NewQueue(size int, stackEnrichment bool, enqueueAlways bool) *Queue {
55 q := &Queue{
56 q: make(chan *Event, size),
57 listeners: make([]Listener, 0),
58 stackEnrichment: stackEnrichment,
59 enqueueAlways: enqueueAlways,
60 }
61 q.decorator = NewStackwalkDecorator(q)
62 return q
63}
64
65// NewQueueWithChannel constructs a new queue with a custom channel.
66func NewQueueWithChannel(ch chan *Event, stackEnrichment bool, enqueueAlways bool) *Queue {

Callers 4

TestStackwalkDecoratorFunction · 0.70
TestQueuePushFunction · 0.70

Calls 1

NewStackwalkDecoratorFunction · 0.85

Tested by 4

TestStackwalkDecoratorFunction · 0.56
TestQueuePushFunction · 0.56