Documentation
¶
Index ¶
- type Channel
- func (ch *Channel) Consume(queue, consumer string, opt wabbit.Option) (<-chan wabbit.Delivery, error)
- func (ch *Channel) ExchangeDeclare(name, kind string, opt wabbit.Option) error
- func (ch *Channel) Publish(exc, route string, msg []byte, opt wabbit.Option) error
- func (ch *Channel) Qos(prefetchCount, prefetchSize int, global bool) error
- func (ch *Channel) QueueBind(name, key, exchange string, opt wabbit.Option) error
- func (ch *Channel) QueueDeclare(name string, opt wabbit.Option) (wabbit.Queue, error)
- func (ch *Channel) QueueDelete(name string, opt wabbit.Option) (int, error)
- func (ch *Channel) QueueUnbind(name, route, exchange string, _ wabbit.Option) error
- type Conn
- type Delivery
- type Publisher
- type Queue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
Channel is a wrapper channel structure for amqp.Channel
func (*Channel) ExchangeDeclare ¶
func (*Channel) Qos ¶
Qos controls how many bytes or messages will be handled by channel or connection.
func (*Channel) QueueDeclare ¶
QueueDeclare declares a new AMQP queue
func (*Channel) QueueDelete ¶
type Conn ¶
type Conn struct { *amqp.Connection // contains filtered or unexported fields }
Conn is the amqp connection
func (*Conn) AutoRedial ¶
AutoRedial manages the automatic redial of connection when unexpected closed. outChan is an unbuffered channel required to receive the errors that results from attempts of reconnect. On successfully reconnected, the true value is sent to done channel
The outChan parameter can receive *amqp.Error for AMQP connection errors or errors.Error for any other net/tcp internal error.
Redial strategy: If the connection is closed in an unexpected way (opposite of conn.Close()), then AutoRedial will try to automatically reconnect waiting for N seconds before each attempt, where N is the number of attempts of reconnecting. If the number of attempts reach 60, it will be zero'ed.
func (*Conn) NotifyClose ¶
NotifyClose registers a listener for close events. For more information see: https://godoc.org/github.com/streadway/amqp#Connection.NotifyClose