eager

package
v1.8.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2020 License: MPL-2.0 Imports: 8 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() iface.Broker

New creates new Broker instance

Types

type Broker

type Broker struct {
	common.Broker
	// contains filtered or unexported fields
}

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) Publish

func (eagerBroker *Broker) Publish(ctx context.Context, task *tasks.Signature) error

Publish places a new message on the default 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 Mode added in v1.4.6

type Mode interface {
	AssignWorker(p iface.TaskProcessor)
}

Mode interface with methods specific for this broker

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL