Documentation ¶
Index ¶
- func New() iface.Broker
- type Broker
- func (eagerBroker *Broker) AssignWorker(w iface.TaskProcessor)
- func (eagerBroker *Broker) GetPendingTasks(queue string) ([]*tasks.Signature, error)
- func (eagerBroker *Broker) Publish(task *tasks.Signature) error
- func (eagerBroker *Broker) StartConsuming(consumerTag string, concurrency int, p iface.TaskProcessor) (bool, error)
- func (eagerBroker *Broker) StopConsuming()
- type EagerMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Broker ¶
Broker represents an "eager" in-memory broker
func (*Broker) AssignWorker ¶
func (eagerBroker *Broker) AssignWorker(w iface.TaskProcessor)
AssignWorker assigns a worker to the eager broker
func (*Broker) GetPendingTasks ¶
GetPendingTasks returns a slice of task.Signatures waiting in the queue
func (*Broker) StartConsuming ¶
func (eagerBroker *Broker) StartConsuming(consumerTag string, concurrency int, p iface.TaskProcessor) (bool, error)
StartConsuming enters a loop and waits for incoming messages
func (*Broker) StopConsuming ¶
func (eagerBroker *Broker) StopConsuming()
StopConsuming quits the loop
type EagerMode ¶
type EagerMode interface {
AssignWorker(p iface.TaskProcessor)
}
EagerMode interface with methods specific for this broker
Click to show internal directories.
Click to hide internal directories.