Categorygithub.com/darwinOrg/go-redis
modulepackage
0.0.21
Repository: https://github.com/darwinorg/go-redis.git
Documentation: pkg.go.dev

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewDelayQueue creates a new queue, use DelayQueue.StartConsume to consume or DelayQueue.SendScheduleMsg to publish message queue := delayqueue.NewQueue("example", redisCli, func(payload string) bool { // callback returns true to confirm successful consumption.
NewDelayQueueMonitor creates a new DelayQueue DelayQueueMonitor.
No description provided by the author
NewDelayQueuePublisher creates a new DelayQueuePublisher by a *redis.Client.
NewDelayQueuePublisher0 creates a new DelayQueuePublisher by a RedisCli instance.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
UseHashTagKey add hashtags to redis keys to ensure all keys of this queue are allocated in the same hash slot.
WithMsgTTL set ttl for a msg example: queue.SendDelayMsg(payload, duration, delayqueue.WithMsgTTL(Hour)).
WithRetryCount set retry count for a msg example: queue.SendDelayMsg(payload, duration, delayqueue.WithRetryCount(3)).
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

AckEvent emmited when receive message successfully consumed callback.
DeliveredEvent emmited when messages has been delivered to consumer.
FinalFailedEvent emmited when message reaches max retry attempts.
AckEvent emmited when receive message consumption failure callback.
NewMessageEvent emmited when send message.
ReadyEvent emmited when messages has reached delivery time.
RetryEvent emmited when message re-delivered to consumer.

# Variables

NilErr represents redis nil.

# Structs

DelayQueue is a message queue supporting delayed/scheduled delivery based on redis.
DelayQueueMonitor can get running status and events of DelayQueue.
DelayQueuePublisher only publishes messages to delayqueue, it is a encapsulation of delayqueue.
Event contains internal event information during the queue operation and can be used to monitor the queue status.

# Interfaces

EventListener which will be called when events occur This Listener can be used to monitor running status.
RedisCli is abstraction for redis client, required commands only not all commands.

# Type aliases

CallbackFunc receives and consumes messages returns true to confirm successfully consumed, false to re-deliver this message.