Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrStarted = errors.New("taskq started") ErrClosed = errors.New("taskq closed") ErrNilTask = errors.New("nil task") )
View Source
var (
EmptyQueue = errors.New("empty queue")
)
Functions ¶
Types ¶
type ConcurrentQueue ¶ added in v0.4.0
type ConcurrentQueue struct {
// contains filtered or unexported fields
}
func NewConcurrentQueue ¶ added in v0.4.0
func NewConcurrentQueue() *ConcurrentQueue
func (*ConcurrentQueue) Dequeue ¶ added in v0.4.0
func (q *ConcurrentQueue) Dequeue(_ context.Context) (Task, error)
type TaskOnError ¶ added in v0.4.2
type TaskQ ¶
type TaskQ struct {
// TaskContextFunc is a function that returns a context for a task.Do execution function.
TaskContextFunc func(t Task) context.Context
// OnDequeueContextFunc is a function that returns a context for Queue.Dequeue function.
DequeueContextFunc func() context.Context
// OnEnqueueError is a function that is called when an error occurs during the Dequeue operation.
OnDequeueError func(ctx context.Context, workerID uint64, err error)
// contains filtered or unexported fields
}
func NewWithQueue ¶ added in v0.4.0
Directories
¶
| Path | Synopsis |
|---|---|
|
example
|
|
|
concurrent-counter-incrementing
command
|
|
|
hello-world
command
|
|
|
task-events
command
|
|
|
redis-custom-queue
module
|
Click to show internal directories.
Click to hide internal directories.