Categorygithub.com/assembla/cony
modulepackage
0.3.2
Repository: https://github.com/assembla/cony.git
Documentation: pkg.go.dev

# README

Cony

High-level AMQP 0.9.1 client library. It's wrapper around low-level streadway/amqp library.

Goals

Provide a way to work with AMQP declaratively

Requirments

The library uses atomic.Value, so Go 1.4+ is needed.

Documentation

GoDoc Build Status

Thread-safety

Cony is thread-safe as long as streadway/amqp is thread-safe. It's recommended to open AMQP channel per thread, so in case of cony it should be Consumer Producer per goroutine.

License

BSD 2 clause - see LICENSE for more details.

# Packages

No description provided by the author

# Functions

AutoAck set this consumer in AutoAck mode.
AutoTag set automatically generated tag like this fmt.Sprintf(QueueName+"-pid-%d@%s", os.Getpid(), os.Hostname()).
Backoff is a functional option, used to define backoff policy, used in `NewClient` constructor.
BlockingChan is a functional option, used to initialize blocking reporting channel in client code, maintaining control over buffering, used in `NewClient` constructor.
Config is a functional option, used to setup extended amqp configuration.
DeclareBinding is a way to declare AMQP binding between AMQP queue and exchange.
DeclareExchange is a way to declare AMQP exchange.
DeclareQueue is a way to declare AMQP queue.
ErrorsChan is a functional option, used to initialize error reporting channel in client code, maintaining control over buffer size.
Exclusive set this consumer in exclusive mode.
NewClient initializes new Client.
NewConsumer Consumer's constructor.
NewPublisher is a Publisher constructor.
NoLocal set this consumer in NoLocal mode.
PublishingTemplate Publisher's functional option.
Qos on channel.
Tag the consumer.
URL is a functional option, used in `NewClient` constructor default URL is amqp://guest:guest@localhost/.

# Variables

DefaultBackoff See: http://blog.gopheracademy.com/advent-2014/backoff/.
ErrNoConnection is an indicator that currently there is no connection available.
ErrPublisherDead indicates that publisher was canceled, could be returned from Write() and Publish() methods.

# Structs

BackoffPolicy is a default Backoffer implementation.
Binding used to declare binding between AMQP Queue and AMQP Exchange.
Client is a Main AMQP client wrapper.
Consumer holds definition for AMQP consumer.
Exchange hold definition of AMQP exchange.
Publisher hold definition for AMQP publishing.
Queue hold definition of AMQP queue.

# Interfaces

Backoffer is interface to hold Backoff strategy.
Declarer is implemented by *amqp.Channel.

# Type aliases

ClientOpt is a Client's functional option type.
ConsumerOpt is a consumer's functional option type.
Declaration is a callback type to declare AMQP queue/exchange/binding.
PublisherOpt is a functional option type for Publisher.