redis

package
v0.0.24 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Redis

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

Redis Redis Stream 队列实现。

func NewRedis

func NewRedis(redisCfg *configv1.Data_Redis, queueCfg *configv1.Data_Queue) (*Redis, error)

NewRedis 创建 Redis 队列实现。

func (*Redis) Append

func (s *Redis) Append(stream string, message data.Message) error

Append 追加消息到 Redis 队列。

func (*Redis) Register

func (s *Redis) Register(stream string, fn data.ConsumerFunc)

Register 注册 Redis 队列消费处理函数,并在首次注册后自动启动消费循环。

func (*Redis) Run

func (s *Redis) Run()

Run 启动 Redis 队列消费,并阻塞等待其结束。

func (*Redis) Shutdown

func (s *Redis) Shutdown()

Shutdown 关闭 Redis 队列消费。

Jump to

Keyboard shortcuts

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