event

package
v3.6.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2018 License: LGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EXIT = "exit"
	WAIT = "wait"
)

Variables

View Source
var (
	Events = make(map[string][]func(interface{}), 2)
)

Functions

func Emit

func Emit(name string, arg interface{})

func EmitAll

func EmitAll(arg interface{})

func Off

func Off(name string, f func(interface{})) error

func OffAll

func OffAll(name string) error

func On

func On(name string, fs ...func(interface{})) error

func Wait

func Wait(sig ...os.Signal) os.Signal

等待信号 如果信号参数为空,则会等待常见的终止信号 SIGINT 2 A 键盘中断(如break键被按下) SIGTERM 15 A 终止信号

Types

This section is empty.

Jump to

Keyboard shortcuts

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