Documentation
¶
Index ¶
- Variables
- type Bind
- type Consumer
- type EventHandler
- type Exchange
- type Option
- type Queue
- type Session
- func (session *Session) ChannelClose() error
- func (session *Session) Close() error
- func (session *Session) Push(data []byte) error
- func (session *Session) QueueDeclare(q Queue) *Session
- func (session *Session) Stream(c *Consumer) (<-chan amqp.Delivery, error)
- func (session *Session) Subscribe(handler func([]byte) error) error
- func (session *Session) UnsafePush(data []byte) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Consumer ¶
type Consumer struct {
Name string
QueueName string
AutoAck bool
Exclusive bool
Handler EventHandler
// contains filtered or unexported fields
}
type EventHandler ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func (*Session) ChannelClose ¶
func (*Session) Push ¶
Push will push data onto the queue, and wait for a confirm. If no confirms are received until within the resendTimeout, it continuously re-sends messages until a confirm is received. This will block until the server sends a confirm. Errors are only returned if the push action itself fails, see UnsafePush.
func (*Session) QueueDeclare ¶
func (*Session) Stream ¶
Stream will continuously put queue items on the channel. It is required to call delivery.Ack when it has been successfully processed, or delivery.Nack when it fails. Ignoring this will cause data to build up on the server.
func (*Session) UnsafePush ¶
UnsafePush will push to the queue without checking for confirmation. It returns an error if it fails to connect. No guarantees are provided for whether the server will recieve the message.