rainbond: github.com/goodrain/rainbond/node/event Index | Files

package event

import "github.com/goodrain/rainbond/node/event"

Index

Package Files

event.go

Constants

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

Variables

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

func Emit Uses

func Emit(name string, arg interface{})

func EmitAll Uses

func EmitAll(arg interface{})

func Off Uses

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

func OffAll Uses

func OffAll(name string) error

func On Uses

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

func Wait Uses

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

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

Package event imports 5 packages (graph). Updated 2018-05-01. Refresh now. Tools for package owners.