Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
Queue is the structure used to publish events and watch for them.
func NewQueue ¶
NewQueue creates a new publish/subscribe queue which supports watchers. The channels that it will create for subscriptions will have the buffer size specified by buffer.
func (*Queue) CallbackWatch ¶
func (q *Queue) CallbackWatch(matcher events.Matcher) (eventq chan events.Event, cancel func())
CallbackWatch returns a channel which will receive all events published to the queue from this point that pass the check in the provided callback function. The returned cancel function will stop the flow of events and close the channel.
Click to show internal directories.
Click to hide internal directories.