Versions in this module Expand all Collapse all v0 v0.1.1 Apr 20, 2023 v0.1.0 Feb 10, 2023 Changes in this version + const ContextKeyTaskName + const DefaultMaxWorkers + type App struct + func NewApp(options ...Option) *App + func (a *App) ApplyAsync(path, queue string, p *AsyncParam) error + func (a *App) Delay(path, queue string, args ...interface{}) error + func (a *App) Register(path, queue string, task TaskF) + func (a *App) Run(ctx context.Context) error + func (a *App) Unregister(path string) + type AsyncParam struct + Args []interface{} + Expires time.Time + Kwargs map[string]interface{} + type Broker interface + Observe func(queues []string) + Receive func() ([]byte, error) + Send func(msg []byte, queue string) error + type Config struct + type Middleware func(next TaskF) TaskF + type Option func(*Config) + func WithBroker(broker Broker) Option + func WithCustomTaskSerializer(serializer protocol.Serializer, mime, encoding string) Option + func WithLogger(logger log.Logger) Option + func WithMaxWorkers(n int) Option + func WithMiddlewares(chain ...Middleware) Option + func WithTaskProtocol(version int) Option + func WithTaskSerializer(mime string) Option + type TaskF func(ctx context.Context, p *TaskParam) error + type TaskParam struct + func NewTaskParam(args []interface{}, kwargs map[string]interface{}) *TaskParam + func (p *TaskParam) Args() []interface{} + func (p *TaskParam) Get(name string) (v interface{}, ok bool) + func (p *TaskParam) Kwargs() map[string]interface{} + func (p *TaskParam) MustBool(name string) bool + func (p *TaskParam) MustFloat(name string) float64 + func (p *TaskParam) MustInt(name string) int + func (p *TaskParam) MustString(name string) string + func (p *TaskParam) NameArgs(name ...string)