规划基于redis pub/sub 的驱动实现

This commit is contained in:
2024-06-25 16:47:29 +08:00
parent c5b0d49c25
commit 943d5f36cb
6 changed files with 203 additions and 10 deletions

22
define/redis.go Normal file
View File

@ -0,0 +1,22 @@
// Package define ...
//
// Description : define ...
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 2024-06-25 16:24
package define
const (
DefaultPartitionNum = 1
)
// RedisEventPubSubConfig redis事件配置
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 16:25 2024/6/25
type RedisEventPubSubConfig struct {
Topic string `json:"topic"` // topic key, 不指定随机生成
PartitionNum int `json:"partition_num"` // 多少个分区, 默认值 : 1
}