Documentation
¶
Index ¶
- Variables
- func CloseChannel(chann *amqp.Channel) error
- func CloseConnection(conn *amqp.Connection) error
- func DeclareNewQueue(channel *amqp.Channel, options *QueueOptions) error
- func GetNewQueue(channel *amqp.Channel, options *QueueOptions) (amqp.Queue, error)
- func NewChannel(conn *amqp.Connection) (*amqp.Channel, error)
- func NewConnection(url string) (*amqp.Connection, error)
- type Listener
- type Message
- type QueueOptions
- type RabbitMQ
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrUnnamedQueue = errors.New("queue needs to be named")
)
Functions ¶
func CloseChannel ¶
func CloseConnection ¶
func CloseConnection(conn *amqp.Connection) error
func DeclareNewQueue ¶
func DeclareNewQueue(channel *amqp.Channel, options *QueueOptions) error
func GetNewQueue ¶
func NewChannel ¶
func NewChannel(conn *amqp.Connection) (*amqp.Channel, error)
func NewConnection ¶
func NewConnection(url string) (*amqp.Connection, error)
Types ¶
type Message ¶
type Message struct { QueueName string Exchange string Key string Mandatory bool Immediate bool // Application or exchange specific fields, // the headers exchange will inspect this field. Headers amqp.Table // Properties ContentType string // MIME content type ContentEncoding string // MIME content encoding DeliveryMode uint8 // Transient (0 or 1) or Persistent (2) Priority uint8 // 0 to 9 CorrelationId string // correlation identifier ReplyTo string // address to to reply to (ex: RPC) Expiration string // message expiration spec MessageId string // message identifier Timestamp time.Time // message timestamp Type string // message type name UserId string // creating user id - ex: "guest" AppId string // creating application id // The application specific payload of the message Body interface{} }
type QueueOptions ¶
type RabbitMQ ¶
type RabbitMQ struct { Connection *amqp.Connection DefaultChannel *amqp.Channel }
func (*RabbitMQ) CloseConnection ¶
func (q *RabbitMQ) CloseConnection()
func (*RabbitMQ) CloseDefaultChannel ¶
func (q *RabbitMQ) CloseDefaultChannel()
func (*RabbitMQ) NewConsumer ¶
func (*RabbitMQ) NewQueue ¶
func (q *RabbitMQ) NewQueue(options *QueueOptions) error
Click to show internal directories.
Click to hide internal directories.