Files
common/log/consts/log_const.go

25 lines
904 B
Go
Raw Permalink Normal View History

2025-12-30 16:14:15 +08:00
package consts
// OperationType 操作类型常量
type OperationType string
const (
OperationInsert OperationType = "insert" // 创建
OperationUpdate OperationType = "update" // 更新
OperationDelete OperationType = "delete" // 删除
OperationDeleteSoft OperationType = "delete_soft" // 软删除
2025-12-30 16:14:15 +08:00
)
// OperationLogCollection 操作日志集合名称常量
const (
OperationLogCollection = "operation_logs" // 操作日志集合名称
)
// 消费者配置(从 Redis Stream 消费请求)
const StreamKey = "log:%s" // 请求 Stream 键名与发消息的key一致
const ConsumerName = "log-consumer" // 消费者名称(唯一标识)
const BatchSize = 1 // 批处理大小每次读取1条
const AutoAck = true // ACK是否自动确认true自动确认false不确认
const LogSubject = "log:subject"