Versions in this module Expand all Collapse all v0 v0.2.1 Jul 21, 2025 v0.2.0 Apr 21, 2025 v0.1.0 Apr 21, 2025 v0.0.1 Mar 29, 2023 Changes in this version + const NAME + var ErrInvalidConnection = errors.New("Invalid queue connection.") + var ErrInvalidDeclare = errors.New("Invalid queue declare.") + var ErrInvalidMsg = errors.New("Invalid queue msg.") + var ErrInvalidWeight = errors.New("Invalid queue connection weight.") + var ErrQueueUnfinished = errors.New("queue unfinished.") + func DeferredPublish(name string, value Map, delay time.Duration) error + func DeferredPublishTo(conn, name string, value Map, delay time.Duration) error + func Publish(name string, values ...Map) error + func PublishTo(conn, name string, values ...Map) error + type Config struct + Codec string + Driver string + External bool + Prefix string + Setting Map + Weight int + type Configs map[string]Config + type Connect interface + Close func() error + DeferredPublish func(name string, data []byte, delay time.Duration) error + Health func() (Health, error) + Open func() error + Publish func(name string, data []byte) error + Register func(string) error + Start func() error + Stop func() error + type Context struct + Args Map + Body Any + Config *Queue + Locals Map + Name string + Setting Map + Value Map + func (ctx *Context) Denied(res Res) + func (ctx *Context) Erred(res Res) + func (ctx *Context) Failed(res Res) + func (ctx *Context) Finish() + func (ctx *Context) Found() + func (ctx *Context) Next() + func (ctx *Context) Retry(delays ...time.Duration) + type Declare struct + Alias []string + Args Vars + Name string + Nullable bool + Text string + type Delay = []time.Duration + type Driver interface + Connect func(*Instance) (Connect, error) + type Filter struct + Execute ctxFunc + Name string + Request ctxFunc + Response ctxFunc + Serve ctxFunc + Text string + type Handler struct + Denied ctxFunc + Error ctxFunc + Failed ctxFunc + Found ctxFunc + Name string + Text string + type Health struct + Workload int64 + type Info struct + Name string + Retry []time.Duration + Thread int + type Instance struct + Config Config + Name string + Setting Map + func (this *Instance) Serve(req Request) Response + func (this *Instance) Submit(next func()) + type Module struct + func (module *Module) Declare(name string, config Declare) + func (module *Module) Driver(name string, driver Driver) + func (module *Module) Filter(name string, config Filter) + func (module *Module) Handler(name string, config Handler) + func (module *Module) Queue(name string, config Queue) + func (this *Module) Config(name string, config Config) + func (this *Module) Configs(config Configs) + func (this *Module) Configure(global Map) + func (this *Module) Connect() + func (this *Module) DeferredPublish(name string, value Map, delay time.Duration) error + func (this *Module) DeferredPublishTo(conn, name string, value Map, delay time.Duration) error + func (this *Module) Initialize() + func (this *Module) Launch() + func (this *Module) Publish(name string, values ...Map) error + func (this *Module) PublishTo(conn, name string, values ...Map) error + func (this *Module) Register(name string, value Any) + func (this *Module) Terminate() + type Queue struct + Action ctxFunc + Actions []ctxFunc + Alias []string + Args Vars + Coding bool + Connect string + Denied ctxFunc + Error ctxFunc + Failed ctxFunc + Found ctxFunc + Name string + Nullable bool + Retry []time.Duration + Setting Map + Text string + Thread int + type Request struct + Attempt int + Data []byte + Name string + Timestamp time.Time + type Response struct + Delay time.Duration + Retry bool + type Retry = []time.Duration