Files
play-with-docker/event/event.go
Jonathan Leibiusky @xetorthio 6eaece99c5 Add events
2017-07-12 21:46:57 -03:00

17 lines
447 B
Go

package event
type EventType string
const INSTANCE_VIEWPORT_RESIZE EventType = "instance viewport resize"
const INSTANCE_DELETE EventType = "instance delete"
const INSTANCE_NEW EventType = "instance new"
const SESSION_END EventType = "session end"
const SESSION_READY EventType = "session ready"
type Handler func(args ...interface{})
type EventApi interface {
Emit(name EventType, args ...interface{})
On(name EventType, handler Handler)
}