package provision // Record-write census entries for plans-3a-creation-caps, layered on // dbRegionForward2WriteCensusInventory. Reviewed by the branch author; the census // owner rules on #280 (PROPOSED-plans-3a-creation-caps). // - The instance, sidecar and both domain-attach doors gain a plan-cap // check under the account lock before their existing writes; their // write sites and classes are unchanged. // - Server.runningThings, Server.checkSidecars and Server.appInstanceCount // only list and parse record keys to count an account's running things // and an app's workers; they write nothing: key-site. func plans3aWriteCensusInventory() []censusEntry { entries := append([]censusEntry(nil), dbRegionForward2WriteCensusInventory()...) replacements := []censusEntry{ {"internal/console/apidomains.go", "Server.handleAPIDomainAttach", "key-site", "lit:instances", "27aa0452556355854cf2a211bd21c33092f241f450d8263d3058cd6c424bcfd9"}, {"internal/console/apiinstances.go", "Server.handleAPIInstanceCreate", "record-writer", "key:CreateRecord", "e3ecf19f43f8ebf7cd117c6f78393e35bf8fe35571df50e3df8b7d120d393928"}, {"internal/console/apisidecars.go", "Server.handleAPISidecarCreate", "record-writer", "key:CreateSidecarRecord", "bbcb85365658ed1ba2bb090a1a3d4f02123ecd8d7d6d04a6bbbf433e94f965ed"}, {"internal/console/domainattach.go", "Server.attachDomainAs", "record-writer", "key:CreateRecord", "dcb7c4fc09a181d27f6a549965273b27b24ac8180aa38abc1b250923fc3ccb3b"}, {"internal/console/plancaps.go", "Server.checkSidecars", "key-site", "key:SidecarsPrefix", "01c9ce701fd8da1d2d41a42eb048c0f2dcfe6654ee245a0a43d8944294d46a62"}, {"internal/console/plancaps.go", "Server.runningThings", "key-site", "key:ParseRecordKey", "6668bb47e5364f4064abd0c4e92f06901fb5803e13e5b3ccb71e169d4afde1f6"}, {"internal/console/plancaps.go", "Server.appInstanceCount", "key-site", "key:ParseRecordKey,key:RecordsPrefix", "e49e0b3ca9ee49240fd88840997fb93ea39aaa7c8e51d6ae634099f5e47595e7"}, } for _, replacement := range replacements { found := false for i, entry := range entries { if entry.File == replacement.File && entry.Unit == replacement.Unit { entries[i], found = replacement, true break } } if !found { entries = append(entries, replacement) } } return entries }