Documentation
¶
Index ¶
- Constants
- func Configure(cfg Map)
- func DeferredEnqueue(name string, value Map, delay time.Duration) error
- func DeferredEnqueueTo(conn, name string, value Map, delay time.Duration) error
- func Enqueue(name string, values ...Map) error
- func EnqueueTo(conn, name string, values ...Map) error
- func Go()
- func Ready()
- func Register(name string, value Any, overrides ...bool)
- type Config
- type Configs
- type Connect
- type Context
- type Delay
- type Delegate
- type Driver
- type Filter
- type Handler
- type Health
- type Info
- 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 (this *Module) DeferredEnqueue(name string, value Map, delay time.Duration) error
- func (this *Module) DeferredEnqueueTo(conn, name string, value Map, delay time.Duration) error
- func (module *Module) Driver(name string, driver Driver, override bool)
- func (this *Module) Enqueue(name string, values ...Map) error
- func (this *Module) EnqueueTo(conn, name string, values ...Map) error
- 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) Queue(name string, config Queue, override bool)
- func (this *Module) Register(name string, value Any, override bool)
- func (this *Module) Terminate()
- type Queue
- type Request
- type Response
Constants ¶
View Source
const (
NAME = "QUEUE"
)
Variables ¶
This section is empty.
Functions ¶
func DeferredEnqueue ¶ added in v0.1.0
func DeferredEnqueueTo ¶ added in v0.1.0
Types ¶
type Connect ¶
type Connect interface {
Open() error
Health() (Health, error)
Close() error
Register(Info) error
Start() error
Stop() error
Enqueue(name string, data []byte) error
DeferredEnqueue(name string, data []byte, delay time.Duration) error
}
Connect 连接
type Context ¶
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) DeferredEnqueue ¶ added in v0.1.0
func (*Module) DeferredEnqueueTo ¶ added in v0.1.0
func (*Module) Initialize ¶
func (this *Module) Initialize()
type Queue ¶
type Queue 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"`
//Option
Thread int `json:"thread"`
// Attempt int `json:"attempt"`
// Interval time.Duration `json:"interval"`
Retry int `json:"retry"`
Delay []time.Duration `json:"delay"`
}
Click to show internal directories.
Click to hide internal directories.