Documentation
¶
Index ¶
- Constants
- type Consumer
- type Option
- type Producer
- func (p *Producer) BatchPush(ctx context.Context, key string, msgList ...queue.Message) error
- func (c *Producer) Close() error
- func (c *Producer) DelayPush(ctx context.Context, key string, msg queue.Message, delaySeconds int64) error
- func (c *Producer) Push(ctx context.Context, key string, msg queue.Message) (err error)
- type QueueItem
Constants ¶
View Source
const ( //direct|fanout|topic ExchangeTypeDirect = "direct" ExchangeTypeFanout = "fanout" ExchangeTypeTopic = "topic" )
View Source
const (
Proto = "rabbit"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Consumer ¶
type Consumer struct { EnableDeadLetter bool //开启死信队列 DeadLetterQueue string // contains filtered or unexported fields }
Consumer Consumer
func NewConsumer ¶
NewConsumerByConfig 创建新的Consumer
type Option ¶
type Option func(opts *options)
func WithExchange ¶
func WithExchangeType ¶
func WithVirtualHost ¶
type Producer ¶
type Producer struct {
// contains filtered or unexported fields
}
Producer memcache配置文件
func NewProducer ¶
NewProducerByConfig 根据配置文件创建一个redis连接
Click to show internal directories.
Click to hide internal directories.