Documentation ¶
Overview ¶
events defines an event subscriber and dispatcher
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EmitterInterface ¶
type EmitterInterface interface { // Emit Sends an event to the subscribed listeners Emit(context.Context, Event) // Subscribe Returns a channel that receives emitted events Subscribe(context.Context) <-chan Event // UnsubscribeAll close all listeners channels UnsubscribeAll() }
EmitterInterface Root interface for events dispatch
type EventEmitter ¶
type EventEmitter struct {
// contains filtered or unexported fields
}
EventEmitter Registers listeners and dispatches events to them
func (*EventEmitter) UnsubscribeAll ¶
func (e *EventEmitter) UnsubscribeAll()
Click to show internal directories.
Click to hide internal directories.