Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Meta ¶
type Meta struct {
Truncated bool `json:"truncated"`
ApproxOriginalBytes int `json:"approxOriginalBytes"`
ApproxReturnedBytes int `json:"approxReturnedBytes"`
}
Meta describes the compaction outcome.
type Options ¶
type Options struct {
// BudgetBytes is the target maximum serialized JSON size (approximate).
BudgetBytes int
// MaxString clamps string lengths (runes). 0 disables string trimming.
MaxString int
// MaxArray keeps only first N items and summarizes the rest. 0 disables array compaction.
MaxArray int
// PreserveKeys are object keys that should not be summarized when choosing a largest key.
PreserveKeys []string
// LowValueKeys are candidates to summarize first when sizes are similar (e.g., "log", "html", "debug").
LowValueKeys []string
}
Options controls compaction thresholds.
Click to show internal directories.
Click to hide internal directories.