event

package
v1.7.2-pre5 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2020 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewManager

func NewManager() interfaces.EventManager

NewManager creates a new event manager with a 100 event buffer

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager handles and processes events

func (*Manager) Emit

func (e *Manager) Emit(eventName string, optionalData ...interface{})

Emit broadcasts the given event to the subscribed listeners

func (*Manager) On

func (e *Manager) On(eventName string, callback func(...interface{}))

On adds a listener for the given event

func (*Manager) PushEvent

func (e *Manager) PushEvent(eventData *messages.EventData)

PushEvent places the given event on to the event queue

func (*Manager) Shutdown added in v0.18.4

func (e *Manager) Shutdown()

Shutdown is called when exiting the Application

func (*Manager) Start

func (e *Manager) Start(renderer interfaces.Renderer)

Start the event manager's queue processing

Jump to

Keyboard shortcuts

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