event

package
v0.0.0-...-9f36605 Latest Latest
Warning

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

Go to latest
Published: May 29, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KEYEVENT = "KEYEVENT"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event interface {
	GetRoute() string
}

type EventHandler

type EventHandler interface {
	Handle(event Event)
}

type EventManager

type EventManager interface {
	GetPool(poolname string) *sync.Pool
	RegisterHandler(routekey string, handler EventHandler)
	UnRegisterHandler(routekey string, handler EventHandler)
	Publish(event Event) bool
}

func GetMgrInstance

func GetMgrInstance() EventManager

func GetMgrInstanceWithParam

func GetMgrInstanceWithParam(workerCount int, eventChanSize int) EventManager

type KeyEvent

type KeyEvent struct {
	Key     string
	Count   int32
	Time    int64
	Allowed bool
}

func (KeyEvent) GetRoute

func (e KeyEvent) GetRoute() string

Jump to

Keyboard shortcuts

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