MCPcopy Create free account
hub / github.com/PostHog/duckgres / latestClosedBucket

Method latestClosedBucket

controlplane/compute_billing_api.go:41–43  ·  view source on GitHub ↗

latestClosedBucket returns the newest bucket_start that is fully closed: every contribution for it has landed (grace exceeds the in-process flush interval), so it is safe to serve — and later delete on ack.

()

Source from the content-addressed store, hash-verified

39 // storage-holding org per day, several per compute-active org) and the
40 // repetitive JSON compresses well. Negotiated per request — clients that
41 // don't send Accept-Encoding: gzip get plain JSON.
42 r.GET("/billing/usage", requireAdmin, gingzip.Gzip(gingzip.DefaultCompression), h.getUsage)
43 r.POST("/billing/ack", requireAdmin, h.postAck)
44}
45
46// latestClosedBucket returns the newest bucket_start that is fully closed:

Callers 2

getUsageMethod · 0.95
postAckMethod · 0.95

Calls 1

AddMethod · 0.80

Tested by

no test coverage detected