events

package
v2.0.0-beta7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 14, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEventsHandler

func NewEventsHandler() events.Handler

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL