Documentation
¶
Index ¶
- Constants
- func Configure(cfg Map)
- func Go()
- func Notify(name string, values ...Map) error
- func NotifyTo(conn, name string, values ...Map) error
- func Ready()
- func Register(name string, value Any, overrides ...bool)
- type Config
- type Configs
- type Connect
- type Context
- type Delegate
- type Driver
- type Event
- type Filter
- type Handler
- type Health
- type Instance
- type Module
- func (this *Module) Config(name string, config Config, override bool)
- func (this *Module) Configs(config Configs, override bool)
- func (this *Module) Configure(global Map)
- func (this *Module) Connect()
- func (module *Module) Driver(name string, driver Driver, override bool)
- func (module *Module) Event(name string, config Event, override bool)
- func (module *Module) Filter(name string, config Filter, override bool)
- func (module *Module) Handler(name string, config Handler, override bool)
- func (this *Module) Initialize()
- func (this *Module) Launch()
- func (module *Module) Notice(name string, config Notice, override bool)
- func (this *Module) Notify(name string, values ...Map) error
- func (this *Module) NotifyTo(conn, name string, values ...Map) error
- func (this *Module) Register(name string, value Any, override bool)
- func (this *Module) Terminate()
- type Notice
Constants ¶
View Source
const (
NAME = "EVENT"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Connect ¶
type Connect interface {
Open() error
Health() (Health, error)
Close() error
Register(name, group string) error
Start() error
Stop() error
Notify(name string, data []byte) error
}
Connect 连接
type Context ¶
type Event ¶
type Event struct {
Name string `json:"name"`
Text string `json:"text"`
Alias []string `json:"alias"`
Nullable bool `json:"-"`
Args Vars `json:"args"`
Setting Map `json:"-"`
Coding bool `json:"-"`
Action ctxFunc `json:"-"`
Actions []ctxFunc `json:"-"`
// 路由单独可定义的处理器
Found ctxFunc `json:"-"`
Error ctxFunc `json:"-"`
Failed ctxFunc `json:"-"`
Denied ctxFunc `json:"-"`
Connect string `json:"connect"`
Group bool `json:"group"`
// contains filtered or unexported fields
}
type Filter ¶
type Filter struct {
Name string `json:"name"`
Text string `json:"text"`
Serve ctxFunc `json:"-"`
Request ctxFunc `json:"-"`
Execute ctxFunc `json:"-"`
Response ctxFunc `json:"-"`
}
Filter 拦截器
type Handler ¶
type Handler struct {
Name string `json:"name"`
Text string `json:"text"`
Found ctxFunc `json:"-"`
Error ctxFunc `json:"-"`
Failed ctxFunc `json:"-"`
Denied ctxFunc `json:"-"`
}
Handler 处理器
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
func (*Module) Initialize ¶
func (this *Module) Initialize()
Click to show internal directories.
Click to hide internal directories.