Versions in this module Expand all Collapse all v2 v2.5.0 Jun 20, 2016 Changes in this version type Task + func (t *Task) HexDump() string + func (t *Task) String() string v2.4.2 Feb 20, 2016 Changes in this version + type DefaultWorker struct + func (w *DefaultWorker) Close() + func (w *DefaultWorker) Halt() + func (w *DefaultWorker) SetJanitor(janitor Janitor) + func (w *DefaultWorker) SetLifecycle(lf Lifecycle) + func (w *DefaultWorker) Start() (<-chan *Task, <-chan error) v2.4.1 Feb 17, 2016 Changes in this version + var ErrAlreadyResolved = errors.New("Attempted to resolve an already-resolved task.") + var ErrNotFound = errors.New("Attempted to complete a task that we aren't working on.") + type DefaultLifecycle struct + func NewLifecycle(pool *redis.Pool) *DefaultLifecycle + func (l *DefaultLifecycle) Abandon(task *Task) error + func (l *DefaultLifecycle) AbandonAll() error + func (l *DefaultLifecycle) Await() + func (l *DefaultLifecycle) Complete(task *Task) error + func (l *DefaultLifecycle) Listen() (<-chan *Task, <-chan error) + func (l *DefaultLifecycle) SetQueues(availableTasks queue.Queue, workingTasks *queue.DurableQueue) + func (l *DefaultLifecycle) StopListening() + type Janitor interface + OnPostConcat func(cnx redis.Conn, worker string) error + OnPreConcat func(cnx redis.Conn, worker string) error + type Lifecycle interface + Abandon func(task *Task) (err error) + AbandonAll func() (err error) + Await func() + Complete func(task *Task) (err error) + Listen func() (<-chan *Task, <-chan error) + SetQueues func(available queue.Queue, working *queue.DurableQueue) + StopListening func() + type Task struct + func NewTask(lifecycle Lifecycle, payload []byte) *Task + func (t *Task) Bytes() []byte + func (t *Task) Fail() error + func (t *Task) IsResolved() bool + func (t *Task) Succeed() error + type Worker struct + func New(pool *redis.Pool, src, id string) *Worker + func (w *Worker) Close() + func (w *Worker) Halt() + func (w *Worker) SetJanitor(janitor Janitor) + func (w *Worker) SetLifecycle(lf Lifecycle) + func (w *Worker) Start() (<-chan *Task, <-chan error)