Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEventsHandler ¶
Types ¶
type HandlerImpl ¶
type HandlerImpl struct { sync.RWMutex // all receivers should be pointers // contains filtered or unexported fields }
HandlerImpl helps to broadcast events to multiple listeners.
func (*HandlerImpl) AddListener ¶
func (eb *HandlerImpl) AddListener(listener events.Listener)
AddListener registers new event listener.
func (*HandlerImpl) NumListeners ¶
func (eb *HandlerImpl) NumListeners() int
NumListeners returns number of event listeners.
func (*HandlerImpl) Push ¶
func (eb *HandlerImpl) Push(e interface{})
Push broadcast events across all event listeners.
Click to show internal directories.
Click to hide internal directories.