amqp

package
v3.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AMQP

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

AMQP interpret (implement) AMQP interface definition

func New

func New(dsn string, pex bool) (*AMQP, error)

New returns a new AMQP configured, or returning an non-nil err if an error occurred while creating connection or channel.

func (*AMQP) Close

func (ai *AMQP) Close() error

Close closes the running amqp connection and channel

func (*AMQP) CreateConsumer

func (ai *AMQP) CreateConsumer(exchange, key, kind, queue string, durable bool, declareArgs, bindArgs amqp.Table) (<-chan amqp.Delivery, error)

CreateConsumer creates a amqp consumer. Most interesting declare args are:

func (*AMQP) NotifyClose

func (ai *AMQP) NotifyClose(c chan *amqp.Error) chan *amqp.Error

NotifyClose wrapper over notifyClose method

func (*AMQP) Publish

func (ai *AMQP) Publish(exchange, key string, opts amqp.Publishing) error

Publish wraps amqp.Publish method

func (*AMQP) WithExchange

func (ai *AMQP) WithExchange(exchange, kind string, durable bool) error

WithExchange creates a amqp exchange

func (*AMQP) WithQos

func (ai *AMQP) WithQos(count, size int, global bool) error

WithQos wrapper over amqp.Qos method

Jump to

Keyboard shortcuts

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