Documentation ¶
Index ¶
- func New(cnf *config.Config) iface.Broker
- type Broker
- func (b *Broker) GetDelayedTasks() (results []*tasks.Signature, err error)
- func (b *Broker) GetPendingTasks(queue string) (results []*tasks.Signature, err error)
- func (b *Broker) Publish(ctx context.Context, signature *tasks.Signature) (err error)
- func (b *Broker) StartConsuming(consumerTag string, concurrency int, taskProcessor iface.TaskProcessor) (result bool, err error)
- func (b *Broker) StopConsuming()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Broker ¶
Broker represents a Redis broker
func (*Broker) GetDelayedTasks ¶
TODO: add paging GetDelayedTasks returns a slice of task signatures that are scheduled, but not yet in the queue
func (*Broker) GetPendingTasks ¶
TODO: add paging GetPendingTasks returns a slice of task signatures waiting in the queue
func (*Broker) StartConsuming ¶
func (b *Broker) StartConsuming(consumerTag string, concurrency int, taskProcessor iface.TaskProcessor) (result bool, err error)
StartConsuming enters a loop and waits for incoming messages
Click to show internal directories.
Click to hide internal directories.