redisqueue

package
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRedisQueue

func GetRedisQueue(diName string) queue.Queue

GetRedisQueue 获取 RedisQueue 实例(单例模式)

Types

type RedisQueue

type RedisQueue struct {
	// contains filtered or unexported fields
}

RedisQueue 实现了基于Redis的队列

func (*RedisQueue) AckMsg

func (m *RedisQueue) AckMsg(ctx context.Context, key string, token string) (bool, error)

AckMsg 实现了 Queue 接口的 AckMsg 方法

func (*RedisQueue) BatchEnqueue

func (m *RedisQueue) BatchEnqueue(ctx context.Context, key string, messages []string) (bool, error)

BatchEnqueue 实现了 Queue 接口的 BatchEnqueue 方法

func (*RedisQueue) Dequeue

func (m *RedisQueue) Dequeue(ctx context.Context, key string) (message string, tag string, token string, dequeueCount int64, err error)

Dequeue 实现了 Queue 接口的 Dequeue 方法

func (*RedisQueue) Enqueue

func (m *RedisQueue) Enqueue(ctx context.Context, key string, message string) (bool, error)

Enqueue 实现了 Queue 接口的 Enqueue 方法

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL