carlos / platform Public

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

Plain git — no account needed to clone.

Download

Download this file

1package provision
2
3// Record-write census entries for design-plans-and-caps (plans 1), layered
4// on scanDemandWriteCensusInventory. Reviewed by the branch author; the
5// census owner rules on #280 (PROPOSED-design-plans-and-caps).
6// - Server.registerCLIRoutes gains the two account plan doors
7// (GET/POST /api/cli/accounts/{account}/plan); its instance and sidecar
8// literals are unchanged, so it keeps its key-site class.
9// - ClassifyMutation gains the put-only accounts/<sqid>/limits.json
10// family; it still only names Put as a method string.
11// - plans.PutLimits writes accounts/<sqid>/limits.json, an account limits
12// record, never an instance or sidecar record: nonrecord.
13func plansCapsWriteCensusInventory() []censusEntry {
14 entries := append([]censusEntry(nil), scanDemandWriteCensusInventory()...)
15 replacements := []censusEntry{
16 {"internal/console/authcli.go", "Server.registerCLIRoutes", "key-site", "lit:instances,lit:sidecars", "baaf2626c2f32666f68109d38910b5e33349086de8b414bafe874a603d708490"},
17 {"internal/hostops/mutation_classifier.go", "ClassifyMutation", "reference", "str:Put", "b3e3b647a6786c67600ed808b45732e1b94a229c6706e58ee5547cba5f983633"},
18 {"internal/plans/record.go", "PutLimits", "nonrecord", "sel:Put", "4284a2f636e4d114538c16d7a4f6ec37bc2ecaf02bac034e8c7a4a0d43d96a9b"},
19 }
20 for _, replacement := range replacements {
21 found := false
22 for i, entry := range entries {
23 if entry.File == replacement.File && entry.Unit == replacement.Unit {
24 entries[i], found = replacement, true
25 break
26 }
27 }
28 if !found {
29 entries = append(entries, replacement)
30 }
31 }
32 return entries
33}
34