event

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2014 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Type    string
	Payload interface{}
	Context interface{}
}

type EventBus

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

func NewEventBus

func NewEventBus() *EventBus

func (*EventBus) AddListener

func (eb *EventBus) AddListener(name string, l interface{})

func (*EventBus) Dispatch added in v0.5.0

func (eb *EventBus) Dispatch(ev *Event)

Distribute an Event to all listeners registered to Event.Type

func (*EventBus) RemoveListener

func (eb *EventBus) RemoveListener(name string)

Jump to

Keyboard shortcuts

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