goworkersqueue

package
v0.0.25 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoOptionSpecified = errors.New("No options specified")
)

Functions

func NewTaskQueue

func NewTaskQueue(options map[string]string) (uniqueue.TaskQueue, error)

NewTaskQueue returns a task queue implementing jrallison/go-workers

Types

type TaskQueue

type TaskQueue struct {
	// contains filtered or unexported fields
}

TaskQueue represents a new task queue based on jrallison/go-workers

func (*TaskQueue) Close

func (queue *TaskQueue) Close() error

func (*TaskQueue) Register

func (queue *TaskQueue) Register(taskName string, task interface{}) error

func (*TaskQueue) StartWorker

func (queue *TaskQueue) StartWorker() error

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL