event

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ELogin       = "login"
	ELogined     = "logined"
	EShowHome    = "show_home"
	ERequsetPwd  = "request_password"
	EResponsePwd = "response_password"
	EChangeUnit  = "change_unit"
	EAdminOfVote = "admin_of_vote"
)

Event list

Variables

This section is empty.

Functions

func RegisterConsumer

func RegisterConsumer(e string, cb Consumer) int

RegisterConsumer register consumer,if e is empty, will recieve all event

func Send

func Send(e string, param ...interface{})

Send send message

func Unregister

func Unregister(id int)

Unregister unregister

Types

type Consumer

type Consumer func(e string, param ...interface{}) error

Consumer message Consumer

Jump to

Keyboard shortcuts

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