Documentation
¶
Overview ¶
Package file is the JSONL file backend for payload logging: one Record per line. The zero-dependency default backend; the s3 backend (which pulls a cloud SDK and is excluded from minimal builds) lives alongside in pkg/payload/s3. Implements payload.Sink.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader is a payload.Reader backed by the same JSONL file Sink writes to. Get scans the file for the request id — fine for dogfood files (MB range). There is no List: the Logs list is served by the log store, not the body store.
type Sink ¶
type Sink struct {
// contains filtered or unexported fields
}
Sink appends one JSONL line per Record. Bodies serialize as base64 (json's []byte encoding), so the file is lossless for any content. Safe for concurrent Write via an internal mutex. Buffering is the OS's job — no userland buffer.
func NewSinkFromWriter ¶
NewSinkFromWriter wraps an existing writer (tests, stdout).