Documentation
¶
Overview ¶
Package trimmer runs a background goroutine that periodically deletes request_logs (and cascading webhook_logs) older than the configured retention window. Keeps the free-tier Neon 0.5 GB storage cap from filling up, and bounds what pilots see in the Logs tab to the last N days of activity.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
Run starts a trimmer loop on the given store. Blocks until ctx is cancelled. Call in a goroutine.
runEvery: how often to sweep. 1 hour is a good default — trimming more
often wastes cycles, less often lets storage drift longer.
retention: rows older than now()-retention are deleted. 10 days is the
default in cli/start.go.
A single initial sweep fires ~30s after Run() so a freshly-booted server doesn't wait a full hour before its first cleanup.
Types ¶
This section is empty.