amqp

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consumer added in v0.4.2

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

Consumer defines a AMQP subscriber.

func New

func New(name, url, queue, exchange string, oo ...OptionFunc) (*Consumer, error)

New creates a new AMQP consumer with some defaults. Use option to change.

func (*Consumer) Close added in v0.4.2

func (c *Consumer) Close() error

Close handles closing channel and connection of AMQP.

func (*Consumer) Consume added in v0.4.2

func (c *Consumer) Consume(ctx context.Context) (<-chan async.Message, <-chan error, error)

Consume starts of consuming a AMQP queue.

type OptionFunc added in v0.4.3

type OptionFunc func(*Consumer) error

OptionFunc definition for configuring the consumer in a functional way.

func Buffer added in v0.4.3

func Buffer(buf int) OptionFunc

Buffer option for adjusting the incoming messages buffer.

func Requeue added in v0.4.3

func Requeue(requeue bool) OptionFunc

Requeue option for adjusting the requeue policy of a message.

func Timeout added in v0.4.3

func Timeout(timeout time.Duration) OptionFunc

Timeout option for adjusting the timeout of the connection.

Jump to

Keyboard shortcuts

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