Documentation ¶
Overview ¶
Package taskqueue contains task queue
Index ¶
- type TaskQueue
- func (tq *TaskQueue) Enqueue(name string, data interface{})
- func (tq *TaskQueue) Len() int
- func (tq *TaskQueue) Requeue(task task, err error)
- func (tq *TaskQueue) RequeueAfter(t task, err error, after time.Duration)
- func (tq *TaskQueue) Run(period time.Duration, stopCh <-chan struct{})
- func (tq *TaskQueue) Shutdown()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TaskQueue ¶
type TaskQueue struct {
// contains filtered or unexported fields
}
TaskQueue manages a work queue through an independent worker that invokes the given sync function for every work item inserted.
func NewTaskQueue ¶
NewTaskQueue creates a new task queue with the given sync function. The sync function is called for every element inserted into the queue.
func (*TaskQueue) RequeueAfter ¶
RequeueAfter adds the task to the queue after the given duration.
Click to show internal directories.
Click to hide internal directories.