Documentation ¶
Index ¶
- type AmqpChannel
- func (c *AmqpChannel) AddConsumer(queueName string, consumerName string, prefetch int) chan amqp.Delivery
- func (c *AmqpChannel) Bind(queueName string, routingKey string, exchangeName string) error
- func (c *AmqpChannel) DeclareExchange(exchangeName, kind string, durable, autoDelete bool) error
- func (c *AmqpChannel) DeclareQueue(queueName string, durable bool, autoDelete bool) (string, error)
- func (c *AmqpChannel) DeleteExchange(exchangeName string, ifUnused bool) error
- func (c *AmqpChannel) DeleteQueue(queueName string, ifUnused bool, ifEmpty bool) error
- func (c *AmqpChannel) Disconnect()
- func (c *AmqpChannel) RemoveConsumer(consumerName string)
- func (c *AmqpChannel) SendToExchange(exchangeName string, routingKey string, body string) error
- func (c *AmqpChannel) SendToExchangeWithType(exchangeName string, routingKey string, body string, contentType string) error
- func (c *AmqpChannel) SendToQueue(queueName string, body string) error
- func (c *AmqpChannel) SendToQueueWithType(queueName string, body string, contentType string) error
- func (c *AmqpChannel) Unbind(queueName string, routingKey string, exchangeName string) error
- type AmqpConnectOption
- type AmqpConnection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AmqpChannel ¶
type AmqpChannel struct {
// contains filtered or unexported fields
}
func NewAmqpChannel ¶
func NewAmqpChannel(amqpConnection *AmqpConnection) *AmqpChannel
func (*AmqpChannel) AddConsumer ¶
func (*AmqpChannel) Bind ¶
func (c *AmqpChannel) Bind(queueName string, routingKey string, exchangeName string) error
Bind 绑定queue至exchange
func (*AmqpChannel) DeclareExchange ¶
func (c *AmqpChannel) DeclareExchange(exchangeName, kind string, durable, autoDelete bool) error
DeclareExchange 创建Exchange kind direct fanout topic headers
func (*AmqpChannel) DeclareQueue ¶
DeclareQueue 创建队列
func (*AmqpChannel) DeleteExchange ¶
func (c *AmqpChannel) DeleteExchange(exchangeName string, ifUnused bool) error
DeleteExchange 删除Exchange
func (*AmqpChannel) DeleteQueue ¶
func (c *AmqpChannel) DeleteQueue(queueName string, ifUnused bool, ifEmpty bool) error
DeleteQueue 删除队列
func (*AmqpChannel) Disconnect ¶
func (c *AmqpChannel) Disconnect()
func (*AmqpChannel) RemoveConsumer ¶
func (c *AmqpChannel) RemoveConsumer(consumerName string)
func (*AmqpChannel) SendToExchange ¶
func (c *AmqpChannel) SendToExchange(exchangeName string, routingKey string, body string) error
SendToExchange 发送数据至指定交换机
func (*AmqpChannel) SendToExchangeWithType ¶
func (c *AmqpChannel) SendToExchangeWithType(exchangeName string, routingKey string, body string, contentType string) error
SendToExchangeWithType 发送数据至指定交换机
func (*AmqpChannel) SendToQueue ¶
func (c *AmqpChannel) SendToQueue(queueName string, body string) error
SendToQueue 发送数据至指定队列
func (*AmqpChannel) SendToQueueWithType ¶
func (c *AmqpChannel) SendToQueueWithType(queueName string, body string, contentType string) error
SendToQueueWithType 发送数据至指定队列
type AmqpConnectOption ¶
type AmqpConnection ¶
type AmqpConnection struct {
// contains filtered or unexported fields
}
func NewAmqpConnection ¶
func NewAmqpConnection(option AmqpConnectOption, logID string) *AmqpConnection
func (*AmqpConnection) Disconnect ¶
func (c *AmqpConnection) Disconnect()
Click to show internal directories.
Click to hide internal directories.