Documentation
¶
Index ¶
- Constants
- type Config
- type Middleware
- type Plugin
- func (p *Plugin) AddHandler(name endure.Named, handler asynq.Handler)
- func (p *Plugin) AddMiddleware(name endure.Named, middleware Middleware)
- func (p *Plugin) Collects() []any
- func (p *Plugin) Init(cfg config.Configurer, log *zap.Logger, client redis.UniversalClient) error
- func (p *Plugin) Name() string
- func (p *Plugin) Serve() chan error
- func (p *Plugin) Stop() error
Constants ¶
View Source
const ( DefaultQueue = "default" AggregateQueue = "aggregate" )
View Source
const PluginName = "jobs"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// List of the middleware names (order will be preserved)
Middleware []string `mapstructure:"middleware"`
Concurrency int `mapstructure:"concurrency"`
Queues map[string]int `mapstructure:"queues"`
StrictPriority bool `mapstructure:"strict_priority"`
HealthCheckInterval time.Duration `mapstructure:"health_check_interval"`
DelayedTaskCheckInterval time.Duration `mapstructure:"delayed_task_check_interval"`
GroupGracePeriod time.Duration `mapstructure:"group_grace_period"`
GroupMaxDelay time.Duration `mapstructure:"group_max_delay"`
GroupMaxSize int `mapstructure:"group_max_size"`
}
func (*Config) BuildAsynqConfig ¶
func (*Config) InitDefault ¶
func (cfg *Config) InitDefault()
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
func (*Plugin) AddMiddleware ¶
func (p *Plugin) AddMiddleware(name endure.Named, middleware Middleware)
func (*Plugin) Init ¶
func (p *Plugin) Init(cfg config.Configurer, log *zap.Logger, client redis.UniversalClient) error
Click to show internal directories.
Click to hide internal directories.