Documentation
¶
Index ¶
- func GetRocketQueue(diName string) queue.Queue
- type RocketMQClient
- type RocketQueue
- func (m *RocketQueue) AckMsg(ctx context.Context, key string, token string) (bool, error)
- func (m *RocketQueue) BatchEnqueue(ctx context.Context, key string, messages []string) (bool, error)
- func (m *RocketQueue) Dequeue(ctx context.Context, key string) (message string, tag string, token string, dequeueCount int64, err error)
- func (m *RocketQueue) Enqueue(ctx context.Context, key string, message string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRocketQueue ¶
GetRocketQueue 获取 RocketQueue 实例(单例模式)
Types ¶
type RocketMQClient ¶
type RocketMQClient struct { Producer rocketmq.Producer Consumer rocketmq.PushConsumer }
RocketMQClient 封装了 RocketMQ 的生产者和消费者
type RocketQueue ¶
type RocketQueue struct {
// contains filtered or unexported fields
}
RocketQueue 实现了基于RocketMQ的队列
func (*RocketQueue) BatchEnqueue ¶
func (m *RocketQueue) BatchEnqueue(ctx context.Context, key string, messages []string) (bool, error)
BatchEnqueue 实现了 Queue 接口的 BatchEnqueue 方法
Click to show internal directories.
Click to hide internal directories.