Documentation
¶
Index ¶
- func New() queue.Broker
- func NewFinite(finite bool) queue.Broker
- type Acknowledger
- type Broker
- type JobIter
- type Queue
- func (q *Queue) Consume(_ int) (queue.JobIter, error)
- func (q *Queue) Publish(j *queue.Job) error
- func (q *Queue) PublishDelayed(j *queue.Job, delay time.Duration) error
- func (q *Queue) RepublishBuried(conditions ...queue.RepublishConditionFunc) error
- func (q *Queue) Transaction(txcb queue.TxCallback) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Acknowledger ¶
type Acknowledger struct {
// contains filtered or unexported fields
}
Acknowledger implements a queue.Acknowledger interface.
func (*Acknowledger) Ack ¶
func (*Acknowledger) Ack() error
Ack is called when the Job has finished.
func (*Acknowledger) Reject ¶
func (a *Acknowledger) Reject(requeue bool) error
Reject is called when the Job has errored. The argument indicates whether the Job should be put back in queue or not. If requeue is false, the job will go to the buried queue until Queue.RepublishBuried() is called.
type Broker ¶
type Broker struct {
// contains filtered or unexported fields
}
Broker is a in-memory implementation of Broker.
type Queue ¶
Queue implements a queue.Queue interface.
func (*Queue) PublishDelayed ¶
PublishDelayed publishes a Job to the queue with a given delay.
func (*Queue) RepublishBuried ¶
RepublishBuried implements the Queue interface.
func (*Queue) Transaction ¶
Transaction calls the given callback inside a transaction.
Click to show internal directories.
Click to hide internal directories.