Download this file
| 1 | package provision |
| 2 | |
| 3 | // Record-write census entries for the sidecar pause (sec-sidecar-create-gate), |
| 4 | // layered on dbRegionForward3WriteCensusInventory (main's last at 65ca4aca). |
| 5 | // handleAPISidecarCreate gains one early return, refuseSidecarsPaused |
| 6 | // (internal/console/sidecarsgate.go), after the shape check and before the |
| 7 | // plan cap, the leftover rail and both write arms. Its write is unchanged: |
| 8 | // the same CreateSidecarRecord create-only write, or the host-claim create. |
| 9 | // No write site is added; the refusal writes nothing. |
| 10 | func secSidecarCreateGateWriteCensusInventory() []censusEntry { |
| 11 | entries := append([]censusEntry(nil), dbRegionForward3WriteCensusInventory()...) |
| 12 | replacements := []censusEntry{ |
| 13 | {"internal/console/apisidecars.go", "Server.handleAPISidecarCreate", "record-writer", "key:CreateSidecarRecord", "72f4d44028fbc46ed2ed1adca6154f385b62e143f47e597a49b6e28570b2ddab"}, |
| 14 | } |
| 15 | for _, r := range replacements { |
| 16 | found := false |
| 17 | for i, e := range entries { |
| 18 | if e.File == r.File && e.Unit == r.Unit { |
| 19 | entries[i], found = r, true |
| 20 | } |
| 21 | } |
| 22 | if !found { |
| 23 | entries = append(entries, r) |
| 24 | } |
| 25 | } |
| 26 | return entries |
| 27 | } |
| 28 | |