delayed_queue

package module
v0.0.0-...-af2a141 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2023 License: MIT Imports: 3 Imported by: 0

README

delayed_queue

用redis做一个延时队列

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dequeue

func Dequeue(ctx context.Context, client *redis.Client, queueID string, limit int64) ([]string, error)

拉取已经到期的消息

func Enqueue

func Enqueue(ctx context.Context, client *redis.Client, queueID string, msg string, delayedMs int64) error

将一条消息msg放入到延时队列中,该消息的延时时间为delayedMs

Types

This section is empty.

Jump to

Keyboard shortcuts

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