Documentation
¶
Index ¶
- Constants
- Variables
- func AddGlobalMiddleware(mw tasker.JobMiddleware)
- func Cancel(ctx context.Context, id tasker.JobID) (*tasker.JobRow, error)
- func Chain(ctx context.Context, jobs []tasker.Job, opts ...tasker.DispatchOpt) ([]*tasker.JobRow, error)
- func Dispatch(ctx context.Context, job tasker.Job, opts ...tasker.DispatchOpt) (*tasker.JobRow, error)
- func DispatchBatch(ctx context.Context, jobs []tasker.Job, opts ...tasker.DispatchOpt) ([]*tasker.JobRow, error)
- func GetJob(ctx context.Context, id tasker.JobID) (*tasker.JobRow, error)
- func RegisterJob(name string, factory tasker.JobFactory)
- func Retry(ctx context.Context, id tasker.JobID) (*tasker.JobRow, error)
- type Config
- type Provider
Constants ¶
View Source
const ConfigStub = `` /* 1664-byte string literal not displayed */
Variables ¶
View Source
var ErrNotInitialized = errors.New("queue: provider is not initialized")
Functions ¶
func AddGlobalMiddleware ¶
func AddGlobalMiddleware(mw tasker.JobMiddleware)
func DispatchBatch ¶
func RegisterJob ¶
func RegisterJob(name string, factory tasker.JobFactory)
Types ¶
type Config ¶
type Config struct {
Driver string
DSN string
DriverName string
TablePrefix string
RoutePrefix string
MaxOpenConns int
MaxIdleConns int
ConnMaxLifetime time.Duration
RedisAddr string
RedisPass string
RedisDB int
RedisPoolSize int
RedisPrefix string
DefaultQueue string
DefaultMaxAttempts int
Workers map[string]int
EnableAutoscale bool
HeartbeatInterval int
RequeueInterval int
RequeueTimeout int
PruneInterval int
PruneAfterHours int
}
func DefaultConfig ¶
func DefaultConfig() *Config
func (*Config) ApplyOverrides ¶
ApplyOverrides applies every present key, including false and zero values.
type Provider ¶ added in v0.1.1
type Provider struct {
Config *Config
// contains filtered or unexported fields
}
func (*Provider) AddCommands ¶ added in v0.1.1
func (*Provider) AddPublishables ¶ added in v0.1.1
func (p *Provider) AddPublishables() []*app.Publishable
func (*Provider) AddRoutes ¶ added in v0.1.1
func (p *Provider) AddRoutes() app.RouteCallback
Click to show internal directories.
Click to hide internal directories.