Documentation
¶
Index ¶
- type Channel
- func (ch *Channel) Confirm(noWait bool) error
- 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) ExchangeDeclarePassive(name, kind string, opt wabbit.Option) error
- func (ch *Channel) NotifyClose(c chan wabbit.Error) chan wabbit.Error
- func (ch *Channel) NotifyPublish(confirm chan wabbit.Confirmation) chan wabbit.Confirmation
- 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) QueueDeclarePassive(name string, opt wabbit.Option) (wabbit.Queue, error)
- func (ch *Channel) QueueDelete(name string, opt wabbit.Option) (int, error)
- func (ch *Channel) QueueInspect(name string) (wabbit.Queue, error)
- func (ch *Channel) QueueUnbind(name, route, exchange string, _ wabbit.Option) error
- type Confirmation
- 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) ExchangeDeclarePassive ¶
func (*Channel) NotifyClose ¶
NotifyClose registers a listener for close events. For more information see: https://godoc.org/github.com/rabbitmq/amqp091-go#Channel.NotifyClose
func (*Channel) NotifyPublish ¶
func (ch *Channel) NotifyPublish(confirm chan wabbit.Confirmation) chan wabbit.Confirmation
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) QueueDeclarePassive ¶
QueueDeclarePassive declares an existing AMQP queue
func (*Channel) QueueDelete ¶
type Confirmation ¶
type Confirmation struct {
amqp.Confirmation
}
func (Confirmation) Ack ¶
func (c Confirmation) Ack() bool
func (Confirmation) DeliveryTag ¶
func (c Confirmation) DeliveryTag() uint64
type Conn ¶
type Conn struct { *amqp.Connection // contains filtered or unexported fields }
Conn is the amqp connection
func DialConfig ¶
DialConfig connects to an AMQP broker, with custom config
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/rabbitmq/amqp091-go#Connection.NotifyClose