event

package
v0.0.0-...-98b2de1 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2015 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dispatch

func Dispatch()

func Emit

func Emit(e EventType, v interface{})

func Handle

func Handle(e EventType, h Handler)

func HandleAll

func HandleAll(h Handler)

Types

type EventType

type EventType int
const (
	EventMessagePushed EventType = iota
	EventMessagePoped
	EventMessageProceeded
	EventMessageDiscarded
	EventMessageAvailable
)

type Handler

type Handler interface {
	HandleEvent(EventType, interface{})
}

type HandlerFunc

type HandlerFunc func(EventType, interface{})

func (HandlerFunc) HandleEvent

func (f HandlerFunc) HandleEvent(e EventType, v interface{})

Jump to

Keyboard shortcuts

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