Documentation ¶
Index ¶
- func New(cnf *config.Config) iface.Broker
- type Broker
- func (b *Broker) GetPendingTasks(queue string) ([]*tasks.Signature, error)
- func (b *Broker) Publish(ctx context.Context, signature *tasks.Signature) error
- func (b *Broker) StartConsuming(consumerTag string, concurrency int, taskProcessor iface.TaskProcessor) (bool, error)
- func (b *Broker) StopConsuming()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Broker ¶
Broker represents a AWS SQS broker There are examples on: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/sqs-example-create-queue.html
func (*Broker) GetPendingTasks ¶
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) (bool, error)
StartConsuming enters a loop and waits for incoming messages
Click to show internal directories.
Click to hide internal directories.