Documentation ¶
Index ¶
- Variables
- func NewTaskQueue(options map[string]string) (uniqueue.TaskQueue, error)
- type TaskQueue
- func (queue *TaskQueue) Close() error
- func (queue *TaskQueue) Register(taskName string, task interface{}) error
- func (queue *TaskQueue) StartWorker() error
- func (queue *TaskQueue) SubmitTask(task string, args ...interface{}) (uniqueue.TaskResult, error)
- func (queue *TaskQueue) SubmitTaskWithMapArgs(task string, args map[string]interface{}) (uniqueue.TaskResult, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoOptionSpecified = errors.New("No options specified")
)
Functions ¶
Types ¶
type TaskQueue ¶
type TaskQueue struct {
// contains filtered or unexported fields
}
TaskQueue represents a new task queue based on jrallison/go-workers
func (*TaskQueue) StartWorker ¶
func (*TaskQueue) SubmitTask ¶
func (queue *TaskQueue) SubmitTask(task string, args ...interface{}) (uniqueue.TaskResult, error)
SubmitTask submits a givne task to the queue
func (*TaskQueue) SubmitTaskWithMapArgs ¶
func (queue *TaskQueue) SubmitTaskWithMapArgs(task string, args map[string]interface{}) (uniqueue.TaskResult, error)
SubmitTaskWithMapArgs submits a given task to the queue with the args as a map
Click to show internal directories.
Click to hide internal directories.