Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type BaseTask ¶
type BaseTask struct { LastErr error `json:"last_error,omitempty"` ProcessIn []time.Duration `json:"process_in,omitempty"` Queue Queue `json:"queue,omitempty"` TaskType TaskType `json:"task_type,omitempty"` }
func NewTaskOnQueue ¶
NewTaskOnQueue creates a Task to be run on the provided Queue
type Processor ¶
Processor starts and manages all the Worker handling a Task
Run starts the task processing and blocks until an os signal to exit the program is received. Once it receives a signal, it gracefully shuts down all active workers and other goroutines to process the tasks.
type Queuer ¶
Queuer provides methods for managing the queue
Close closes the underlying connection for the given driver Enqueue adds the Task to the Queue
type Task ¶
Task queues a job to be executed.
LastError stores the last error encountered whn running the Task ¶
OnQueue indicates the Queue the Task should be executed on.
RunIn indicates when to run the Task.
Type is an identifier for the Task.
Click to show internal directories.
Click to hide internal directories.