Documentation ¶
Index ¶
- type RabbitMQ
- func (r *RabbitMQ) Consumer(ctx context.Context, queueName string, consumerFunc queueLib.ConsumerFunc, ...)
- func (r *RabbitMQ) Publish(ctx context.Context, message messageLib.IMessage, ...) error
- func (r *RabbitMQ) RpcRequest(ctx context.Context, key string, data []byte, ...) ([]byte, error)
- func (r *RabbitMQ) Run(ctx context.Context)
- func (r *RabbitMQ) Shutdown(ctx context.Context)
- func (r *RabbitMQ) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RabbitMQ ¶
type RabbitMQ struct { Url string ReconnectInterval int Handler []rabbitmq.Handler Config rabbitmq.Config ConsumerOptions *rabbitmq.ConsumerOptions PublisherOptions *rabbitmq.PublisherOptions Logger rabbitmq.Logger // contains filtered or unexported fields }
RabbitMQ cache implement
func NewRabbitMQ ¶
func (*RabbitMQ) Consumer ¶
func (r *RabbitMQ) Consumer(ctx context.Context, queueName string, consumerFunc queueLib.ConsumerFunc, optionFuncs ...func(*queueLib.ConsumeOptions))
Consumer 监听消费者
func (*RabbitMQ) Publish ¶
func (r *RabbitMQ) Publish(ctx context.Context, message messageLib.IMessage, optionFuncs ...func(*queueLib.PublishOptions)) error
Publish 消息入生产者
Click to show internal directories.
Click to hide internal directories.