规划基于redis pub/sub 的驱动实现
This commit is contained in:
@ -18,6 +18,7 @@ type EventData struct {
|
||||
Host string `json:"host"` // 触发事件host
|
||||
Timestamp int64 `json:"timestamp"` // 触发时间,纳秒级时间戳
|
||||
SystemTimestamp int64 `json:"system_timestamp"` // 发送时的系统时间
|
||||
Key string `json:"key"` // 会基于当前值进行hash, 决定消息分区, 不指定则随机生成
|
||||
Data any `json:"data"` // 发送的数据
|
||||
}
|
||||
|
||||
@ -27,8 +28,10 @@ type EventData struct {
|
||||
//
|
||||
// Date : 15:56 2024/6/25
|
||||
type SendResult struct {
|
||||
Data *EventData `json:"data"` // 发送的数据
|
||||
IsSuccess bool `json:"is_success"` // 是否发送成功
|
||||
FailReason string `json:"fail_reason"` // 失败原因
|
||||
Extension map[string]any `json:"extension"` // 扩展数据
|
||||
Data *EventData `json:"data"` // 发送的数据
|
||||
PartitionNum int `json:"partition_num"` // 分区索引编号
|
||||
Topic string `json:"topic"` // 使用的真实topic
|
||||
IsSuccess bool `json:"is_success"` // 是否发送成功
|
||||
FailReason string `json:"fail_reason"` // 失败原因
|
||||
Extension map[string]any `json:"extension"` // 扩展数据
|
||||
}
|
||||
|
Reference in New Issue
Block a user