Documentation
¶
Index ¶
Constants ¶
View Source
const ( DriverSync string = "sync" DriverDatabase string = "database" DriverMachinery string = "machinery" DriverCustom string = "custom" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DriverCreator ¶ added in v1.15.12
type JobWithShouldRetry ¶ added in v1.15.12
type PendingJob ¶ added in v1.15.12
type PendingJob interface {
// Delay dispatches the task after the given delay.
Delay(time time.Time) PendingJob
// Dispatch dispatches the task.
Dispatch() error
// DispatchSync dispatches the task synchronously.
DispatchSync() error
// OnConnection sets the connection of the task.
OnConnection(connection string) PendingJob
// OnQueue sets the queue of the task.
OnQueue(queue string) PendingJob
}
type Queue ¶
type Queue interface {
// Connection gets a driver instance by connection name
Connection(name string) (Driver, error)
// Chain creates a chain of jobs to be processed one by one, passing
Chain(jobs []ChainJob) PendingJob
// Failer gets failed jobs
Failer() Failer
// GetJob gets job by signature
GetJob(signature string) (Job, error)
// GetJobs gets all jobs
GetJobs() []Job
// JobStorer gets job storer
JobStorer() JobStorer
// Job add a job to queue
Job(job Job, args ...[]Arg) PendingJob
// Register register jobs
Register(jobs []Job)
// Worker create a queue worker
Worker(payloads ...Args) Worker
}
type ReservedJob ¶ added in v1.15.12
Click to show internal directories.
Click to hide internal directories.