Documentation ¶
Overview ¶
Example ¶
eventListener := New() ch := make(chan string) eventListener.Add("eventname", ch) for eventdata := range ch { fmt.Println(eventdata + " world") } eventListener.Emit("eventname", "hello")
Output:
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Listener ¶
type Listener interface { SetLimit(eventName string, limit time.Duration) ProvideChannel(eventName string) <-chan string Add(eventName string, channel chan<- string) Remove(eventName string, channel chan<- string) Emit(eventName string, data string) SetBuffer(eventName string) RetryEmit(eventName string) Book(eventName string) }
Listener has a list of channels watching for updates.
Click to show internal directories.
Click to hide internal directories.