Documentation
¶
Overview ¶
Merge multiple incoming events into one, and fan out to subscribers
Publish, Subscribe and Emit package for gopi.Publisher interface
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
NullEvent = &nullEvent{}
)
Functions ¶
This section is empty.
Types ¶
type EventMerger ¶
type EventMerger interface { gopi.Publisher // Add a channel for merging Add(<-chan gopi.Event) // Close the event merger Close() }
EventMerger represents a way to merge events and subscribe the emitted events
func NewEventMerger ¶
func NewEventMerger(channels ...<-chan gopi.Event) EventMerger
Create an event merger object and start listening on incoming channels
type PubSub ¶
type PubSub struct {
// contains filtered or unexported fields
}
func (*PubSub) Unsubscribe ¶
type Publisher ¶
func (*Publisher) Close ¶
func (this *Publisher) Close()
Close will unsubscribe all remaining channels
func (*Publisher) Emit ¶
Emit an event onto all subscriber channels, this method will block if the subscribers are not processing incoming events
func (*Publisher) Unsubscribe ¶
Unsubscribe closes a channel and removes it from the list of channels which emitting can happen on
Click to show internal directories.
Click to hide internal directories.