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 ConsumerName = "log-consumer" // 消费者名称(唯一标识) const BatchSize = 1 // 批处理大小(每次读取1条) const AutoAck = true // ACK是否自动确认(true自动确认,false不确认) const LogSubject = "log:subject"