Documentation
¶
Overview ¶
Package oplog 提供异步操作日志队列: 请求/业务动作日志先入内存队列,由后台消费者批量写入 Sink, 不阻塞请求链路(go-admin 内存队列思路)。
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entry ¶
type Entry struct {
Time time.Time // 操作时间
UserID int64 // 操作用户 ID(0 表示未认证)
UserEmail string // 操作用户邮箱
Method string // HTTP 方法
Path string // 请求路径
Status int // HTTP 状态码
Duration time.Duration // 处理耗时
RequestID string // 链路 Request ID
Action string // 业务动作(如 order.create)
Detail string // 业务附加信息
}
Entry 是单条操作日志。
Click to show internal directories.
Click to hide internal directories.