Documentation
¶
Index ¶
- func DisableAutoReconnect() func(*Connection)
- func NewWrappedDelivery(d amqp.Delivery) wabbitiface.WrappedDelivery
- func UseDefaultNotifiers() func(*Connection)
- type Channel
- type Config
- type Connection
- func (me *Connection) Channel() (wabbitiface.WrappedChannel, error)
- func (me *Connection) Close() error
- func (me *Connection) Conn() *amqp.Connection
- func (me *Connection) Connect() error
- func (me *Connection) NotifyClose(ch chan *amqp.Error) chan *amqp.Error
- func (me *Connection) SetNotifierFunc(fn ...wabbitiface.Notify)
- func (me *Connection) SetRecoveryFunc(fn ...func(bool))
- type Delivery
- func (d Delivery) Ack(multiple bool) error
- func (d Delivery) AppID() string
- func (d Delivery) Body() []byte
- func (d Delivery) ConsumerTag() string
- func (d Delivery) ContentEncoding() string
- func (d Delivery) ContentType() string
- func (d Delivery) CorrelationID() string
- func (d Delivery) DeliveryMode() uint8
- func (d Delivery) DeliveryTag() uint64
- func (d Delivery) Exchange() string
- func (d Delivery) Expiration() string
- func (d Delivery) MessageCount() uint32
- func (d Delivery) MessageID() string
- func (d Delivery) Nack(multiple, requeue bool) error
- func (d Delivery) Priority() uint8
- func (d Delivery) Redelivered() bool
- func (d Delivery) ReplyTo() string
- func (d Delivery) RoutingKey() string
- func (d Delivery) Timestamp() time.Time
- func (d Delivery) Type() string
- func (d Delivery) UserID() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisableAutoReconnect ¶
func DisableAutoReconnect() func(*Connection)
func NewWrappedDelivery ¶
func NewWrappedDelivery(d amqp.Delivery) wabbitiface.WrappedDelivery
func UseDefaultNotifiers ¶
func UseDefaultNotifiers() func(*Connection)
Types ¶
type Channel ¶
func (*Channel) DeclareExchange ¶
func (me *Channel) DeclareExchange(options *opts.ExchangeBindingOpts, bindQueue bool, queueOpts opts.QueueOptsMap) (exchange string, err error)
DeclareExchange queues should be verified before declaring exchange bindQueue should be true for consumers
func (*Channel) DeclareQueue ¶
func (me *Channel) DeclareQueue(mustBind, mustVerify bool, queueOpts opts.QueueOptsMap) error
func (*Channel) SetNotifierFunc ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
Connection wrapper around the amqp.Connection that handles reconnection automatically(unless disabled). It then calls the notofierRecovered function to notify of updates
func NewConnection ¶
func NewConnection(cfg wabbitiface.ConfigIface, opts ...func(*Connection)) (*Connection, error)
NewConnection returns a Connection pointer
func (*Connection) Channel ¶
func (me *Connection) Channel() (wabbitiface.WrappedChannel, error)
func (*Connection) Close ¶
func (me *Connection) Close() error
func (*Connection) Conn ¶
func (me *Connection) Conn() *amqp.Connection
Conn returns the underlying amqp.Connection pointer
func (*Connection) Connect ¶
func (me *Connection) Connect() error
func (*Connection) NotifyClose ¶
func (me *Connection) NotifyClose(ch chan *amqp.Error) chan *amqp.Error
func (*Connection) SetNotifierFunc ¶
func (me *Connection) SetNotifierFunc(fn ...wabbitiface.Notify)
SetNotifierFunc adds a notifier function that notofies disconnection
func (*Connection) SetRecoveryFunc ¶
func (me *Connection) SetRecoveryFunc(fn ...func(bool))
SetNotifierFunc adds a notifier function that notofies that the connection has been reestablished
type Delivery ¶
type Delivery struct {
// contains filtered or unexported fields
}
func (Delivery) ConsumerTag ¶
func (Delivery) ContentEncoding ¶
func (Delivery) ContentType ¶
func (Delivery) CorrelationID ¶
func (Delivery) DeliveryMode ¶
func (Delivery) DeliveryTag ¶
func (Delivery) Expiration ¶
func (Delivery) MessageCount ¶
func (Delivery) Redelivered ¶
func (Delivery) RoutingKey ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
example
|
|
|
direct/consumer
command
|
|
|
direct/publisher
command
|
|
|
fanout/consumer
command
|
|
Click to show internal directories.
Click to hide internal directories.