carlos / platform Public

Clone
git clone https://amadan.net/carlos/platform

Plain git — no account needed to clone.

Download

Download this file

1package usage
2
3// CensusAccount is one account's existence-count on one day.
4type CensusAccount struct {
5 Apps int `json:"apps"`
6 Routes int `json:"routes"`
7}
8
9// CensusDay is usage/census/<date>.json — the whole deployment's per-account
10// counts, snapshotted once per UTC day by the console's economics pass so
11// existence-metering has history even though the registry holds only live
12// state.
13type CensusDay struct {
14 V int `json:"v"` // 1
15 Date string `json:"date"`
16 Accounts map[string]CensusAccount `json:"accounts"` // account name ("" normalized to "ops")
17}
18
19// CensusDayKey is the bucket key for a day's census.
20func CensusDayKey(date string) string { return "usage/census/" + date + ".json" }
21
22// CensusPrefix is the List prefix for census days.
23const CensusPrefix = "usage/census/"
24