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

Function NewQueueWithChannel

pkg/event/queue.go:66–75  ·  view source on GitHub ↗

NewQueueWithChannel constructs a new queue with a custom channel.

(ch chan *Event, stackEnrichment bool, enqueueAlways bool)

Source from the content-addressed store, hash-verified

64
65// NewQueueWithChannel constructs a new queue with a custom channel.
66func NewQueueWithChannel(ch chan *Event, stackEnrichment bool, enqueueAlways bool) *Queue {
67 q := &Queue{
68 q: ch,
69 listeners: make([]Listener, 0),
70 stackEnrichment: stackEnrichment,
71 enqueueAlways: enqueueAlways,
72 }
73 q.decorator = NewStackwalkDecorator(q)
74 return q
75}
76
77// RegisterListener registers a new queue event listener. The listener
78// is invoked before the event is pushed to the queue.

Callers 1

NewConsumerFunction · 0.92

Calls 1

NewStackwalkDecoratorFunction · 0.85

Tested by

no test coverage detected