Documentation ¶
Index ¶
- Constants
- type RabbitMQ
- func (r *RabbitMQ) AddTopicRouteKey(routes ...string) error
- func (r *RabbitMQ) Close()
- func (r *RabbitMQ) Consumer(consumer string, callback func(<-chan amqp.Delivery)) error
- func (r *RabbitMQ) DirectBind() error
- func (r *RabbitMQ) SendMessage(msg amqp.Publishing) error
- func (r *RabbitMQ) TopicBind() error
- type RedisMQ
- type RedisMqOpf
- type RedisMqOptions
Constants ¶
View Source
const ( Direct string = "direct" Topic string = "topic" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RabbitMQ ¶
type RabbitMQ struct { QueueName string // 队列名 Exchange string // 交换机 RouteKey []string // 路由键 Address string // 连接信息 // contains filtered or unexported fields }
func NewRabbitMQ ¶
func (*RabbitMQ) AddTopicRouteKey ¶
AddTopicRouteKey 增加路由键
func (*RabbitMQ) SendMessage ¶
func (r *RabbitMQ) SendMessage(msg amqp.Publishing) error
SendMessage 通过指定的 routeKey 发送消息
type RedisMQ ¶
type RedisMQ struct {
// contains filtered or unexported fields
}
func NewRedisMq ¶
func NewRedisMq(conf *gofkConfs.RedisConfig, opts ...RedisMqOpf) *RedisMQ
type RedisMqOpf ¶
type RedisMqOpf func(options *RedisMqOptions)
func AddRedisMqTopic ¶
func AddRedisMqTopic(topic string) RedisMqOpf
Click to show internal directories.
Click to hide internal directories.