NewQueueWithChannel constructs a new queue with a custom channel.
(ch chan *Event, stackEnrichment bool, enqueueAlways bool)
| 64 | |
| 65 | // NewQueueWithChannel constructs a new queue with a custom channel. |
| 66 | func 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. |
no test coverage detected