Versions in this module Expand all Collapse all v1 v1.0.1 Jan 6, 2023 v1.0.0 Nov 12, 2022 Changes in this version + var ErrNoConnection = errors.New("No connection available") + var ErrPublisherDead = errors.New("Publisher is dead") + type BackoffPolicy struct + func (b BackoffPolicy) Backoff(n int) time.Duration + type Backoffer interface + Backoff func(int) time.Duration + var DefaultBackoff Backoffer = BackoffPolicy{ ... } + type Binding struct + Args amqp.Table + Exchange Exchange + Key string + Queue *Queue + type Client struct + func NewClient(opts ...ClientOpt) *Client + func (c *Client) Blocking() <-chan amqp.Blocking + func (c *Client) Close() + func (c *Client) Connection() (*amqp.Connection, error) + func (c *Client) Consume(cons *Consumer) + func (c *Client) Declare(d []Declaration) + func (c *Client) Errors() <-chan error + func (c *Client) Loop() bool + func (c *Client) Publish(pub *Publisher) + type ClientOpt func(*Client) + func Backoff(bo Backoffer) ClientOpt + func BlockingChan(blockingChan chan amqp.Blocking) ClientOpt + func Config(config amqp.Config) ClientOpt + func ErrorsChan(errChan chan error) ClientOpt + func URL(addr string) ClientOpt + type Consumer struct + func NewConsumer(q *Queue, opts ...ConsumerOpt) *Consumer + func (c *Consumer) Cancel() + func (c *Consumer) Deliveries() <-chan amqp.Delivery + func (c *Consumer) Errors() <-chan error + type ConsumerOpt func(*Consumer) + func AutoAck() ConsumerOpt + func AutoTag() ConsumerOpt + func Exclusive() ConsumerOpt + func NoLocal() ConsumerOpt + func Qos(count int) ConsumerOpt + func Tag(tag string) ConsumerOpt + type Declaration func(Declarer) error + func DeclareBinding(b Binding) Declaration + func DeclareExchange(e Exchange) Declaration + func DeclareExchangePassive(e Exchange) Declaration + func DeclareQueue(q *Queue) Declaration + func DeclareQueuePassive(q *Queue) Declaration + type Declarer interface + ExchangeDeclare func(name, kind string, durable, autoDelete, internal, noWait bool, args amqp.Table) error + ExchangeDeclarePassive func(name, kind string, durable, autoDelete, internal, noWait bool, args amqp.Table) error + QueueBind func(name, key, exchange string, noWait bool, args amqp.Table) error + QueueDeclare func(name string, durable, autoDelete, exclusive, noWait bool, args amqp.Table) (amqp.Queue, error) + QueueDeclarePassive func(name string, durable, autoDelete, exclusive, noWait bool, args amqp.Table) (amqp.Queue, error) + type Exchange struct + Args amqp.Table + AutoDelete bool + Durable bool + Kind string + Name string + type Publisher struct + func NewPublisher(exchange string, key string, opts ...PublisherOpt) *Publisher + func (p *Publisher) Cancel() + func (p *Publisher) Publish(pub amqp.Publishing) error + func (p *Publisher) PublishWithRoutingKey(pub amqp.Publishing, key string) error + func (p *Publisher) Write(b []byte) (int, error) + type PublisherOpt func(*Publisher) + func PublishingTemplate(t amqp.Publishing) PublisherOpt + type Queue struct + Args amqp.Table + AutoDelete bool + Durable bool + Exclusive bool + Name string