Documentation
¶
Overview ¶
Package audit records the append-only admin/security audit log. It wraps store.AuditStore with fire-and-forget semantics: a write failure is logged but never propagated, so auditing can never fail the request it describes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Sink ¶
type Sink struct {
// contains filtered or unexported fields
}
Sink appends audit records. Construct one per instance and share it across the handlers and the security-event emitters.
func (*Sink) Append ¶
func (s *Sink) Append(ctx context.Context, e store.AuditEntry)
Append writes one audit entry, filling in its id and timestamp when the caller left them zero. It never blocks the caller on failure: a store error is logged and swallowed, because losing an audit line must not fail (or roll back) the action it records.
Click to show internal directories.
Click to hide internal directories.