Files
common/log/consts/log_const.go

26 lines
989 B
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package consts
// OperationType 操作类型常量
type OperationType string
const (
OperationInsert OperationType = "insert" // 创建
OperationUpdate OperationType = "update" // 更新
OperationDelete OperationType = "delete" // 删除
OperationDeleteSoft OperationType = "delete_soft" // 软删除
)
// OperationLogCollection 操作日志集合名称常量
const (
OperationLogCollection = "operation_logs" // 操作日志集合名称
)
// 消费者配置(从 Redis Stream 消费请求)
const StreamKey = "log:%s" // 请求 Stream 键名与发消息的key一致
const GroupName = "log:consumer:group" // 消费者组名
const ConsumerName = "message-consumer-1" // 消费者名称(唯一标识)
const BatchSize = 1 // 批处理大小每次读取1条
const AutoAck = true // ACK是否自动确认true自动确认false不确认
const LogSubject = "log:subject"