Versions in this module Expand all Collapse all v0 v0.0.3 Nov 25, 2025 v0.0.2 Nov 25, 2025 Changes in this version + func WithSkipPrefix(ctx context.Context) context.Context v0.0.1 Nov 1, 2025 Changes in this version + const StateConsuming + const StatePending + const StateReady + const StateReadyRetry + const StateUnknown + func Dict(ctx context.Context, name DictName, key string) (string, error) + func InitCache(m *Memory, r *Redis) + func InitMemory(opts ...MemoryOption) + func InitRedis(opts ...RedisOption) + func NewDict(name DictName, query DictQuery, ttl ...time.Duration) + func Ptr[T any](v T) *T + func Val[T any](v *T) T + type Cache struct + func CacheL2() *Cache + func NewCache(m *Memory, r *Redis) *Cache + func (c *Cache) Del(ctx context.Context, k string) error + func (c *Cache) Get(ctx context.Context, k string) (string, error) + func (c *Cache) Set(ctx context.Context, key string, value string, ttl time.Duration) + type DelayQueue struct + func NewQueue(topic Topic, opts ...QueueOption) *DelayQueue + func (q *DelayQueue) DisableListener() + func (q *DelayQueue) DisableReport() + func (q *DelayQueue) EnableReport() + func (q *DelayQueue) GetPendingCount() (int64, error) + func (q *DelayQueue) GetProcessingCount() (int64, error) + func (q *DelayQueue) GetReadyCount() (int64, error) + func (q *DelayQueue) ListenEvent(listener EventListener) + func (q *DelayQueue) SendDelayMsg(payload string, duration time.Duration) (string, error) + func (q *DelayQueue) SendScheduleMsg(payload string, t time.Time) (string, error) + func (q *DelayQueue) Stop() + func (q *DelayQueue) Subscribe(cb func(payload string) bool) (done <-chan struct{}) + func (q *DelayQueue) TryIntercept(id string) (*InterceptResult, error) + type DictName Prefix + func (t DictName) String(args ...string) string + type DictQuery func(ctx context.Context, key string) string + type Event struct + Code EventType + MsgCount int + Timestamp int64 + type EventListener interface + OnEvent func(*Event) + type EventType int + const AckEvent + const DeliveredEvent + const FinalFailedEvent + const NackEvent + const NewMessageEvent + const ReadyEvent + const RetryEvent + func (t EventType) String() string + type InterceptResult struct + Intercepted bool + State string + type MemEntry struct + Expire int64 + Value string + type Memory struct + func Mem() *Memory + func NewMemory(opts ...MemoryOption) *Memory + func (m *Memory) Capacity() int + func (m *Memory) Close() error + func (m *Memory) Delete(key string) + func (m *Memory) Get(key string) (string, bool) + func (m *Memory) KeyMetadata(key string) bigcache.Metadata + func (m *Memory) Len() int + func (m *Memory) Range(fn func(key string, value string)) + func (m *Memory) Set(key string, value string, ttl ...time.Duration) + func (m *Memory) Stats() bigcache.Stats + type MemoryOption func(*memoryOptions) + func WithMemoryOptions(options *bigcache.Config) MemoryOption + func WithMemoryPrefix(prefix Prefix) MemoryOption + type Monitor struct + func NewMonitor(topic Topic, opts ...QueueOption) *Monitor + func (m *Monitor) GetPendingCount() (int64, error) + func (m *Monitor) GetProcessingCount() (int64, error) + func (m *Monitor) GetReadyCount() (int64, error) + func (m *Monitor) ListenEvent(listener EventListener) (func(), error) + type Prefix string + func (p Prefix) String(args ...string) string + type PrefixHook struct + func NewPrefixHook(prefix Prefix) *PrefixHook + func (h PrefixHook) DialHook(next redis.DialHook) redis.DialHook + func (h PrefixHook) ProcessHook(next redis.ProcessHook) redis.ProcessHook + func (h PrefixHook) ProcessPipelineHook(next redis.ProcessPipelineHook) redis.ProcessPipelineHook + type Publisher struct + func NewPublisher(topic Topic, opts ...QueueOption) *Publisher + func (p *Publisher) SendDelayMsg(payload string, duration time.Duration) (string, error) + func (p *Publisher) SendScheduleMsg(payload string, t time.Time) (string, error) + type QueueOption func(*queueOptions) + func WithQueueConcurrent(concurrent uint) QueueOption + func WithQueueDefaultTTL(ttl time.Duration) QueueOption + func WithQueueFetchInterval(interval time.Duration) QueueOption + func WithQueueFetchLimit(limit uint) QueueOption + func WithQueueHashTag(hashTag bool) QueueOption + func WithQueueMaxConsumeDuration(duration time.Duration) QueueOption + func WithQueueNackRedeliveryDelay(delay time.Duration) QueueOption + func WithQueuePrefix(prefix string) QueueOption + func WithQueueRetryCount(count uint) QueueOption + type Redis struct + func NewRedis(opts ...RedisOption) *Redis + func Rds() *Redis + func (r *Redis) BatchDelete(ctx context.Context, pattern string, batchSize ...int64) (int64, error) + func (r *Redis) FloatToZ(values map[string]float64) []redis.Z + type RedisOption func(*redisOptions) + func WithRedisOptions(redis *redis.UniversalOptions) RedisOption + func WithRedisPrefix(prefix string) RedisOption + type Topic Prefix + func (t Topic) String() string