amqpbroker

package
v0.0.0-...-d4cb73b Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broker

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

func New

func New(connectionFactory ConnectionFactory, options ...OptionFunc) (*Broker, error)

func (*Broker) Close

func (b *Broker) Close() error

func (*Broker) Consume

func (b *Broker) Consume(ctx worq.Context, queueName string) (worq.Consumer, error)

func (*Broker) Enqueue

func (b *Broker) Enqueue(pub *worq.Publishing) error

type ConnectionFactory

type ConnectionFactory func() (*amqp.Connection, error)

type Consumer

type Consumer struct {
	// contains filtered or unexported fields
}

func (*Consumer) Ack

func (c *Consumer) Ack(msg worq.Message) error

func (*Consumer) Close

func (c *Consumer) Close() error

func (*Consumer) Err

func (c *Consumer) Err() error

func (*Consumer) Message

func (c *Consumer) Message() (worq.Message, error)

func (*Consumer) Nack

func (c *Consumer) Nack(msg worq.Message, requeue bool) error

func (*Consumer) Next

func (c *Consumer) Next() bool

type Message

type Message struct {
	// contains filtered or unexported fields
}

func (*Message) Body

func (msg *Message) Body() []byte

func (*Message) ContentType

func (msg *Message) ContentType() string

func (*Message) Headers

func (msg *Message) Headers() map[string]interface{}

func (*Message) ID

func (msg *Message) ID() string

func (*Message) Queue

func (msg *Message) Queue() string

func (*Message) Task

func (msg *Message) Task() string

type OptionFunc

type OptionFunc func(*Broker) error

OptionFunc is a function that configures the AMQPBroker.

func SetExchange

func SetExchange(exchange, exchangeType string) OptionFunc

Jump to

Keyboard shortcuts

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