Files
mesh-delivery/modules/mesh-delivery-indexer/internal/index/names.go
T
jschoubben cf93d30150 Names N3 (indexer): the indexer names its own buckets from its credential's module
Its 26 `<Module>_<state>` bucket constants (candidates, manifests, verdicts, packages, taken, the
control records, pins, pending and the rest), its consumers, findings and first views were named
from the constant Module; they are now index.Bucket(cred.Module, <state>), and its words name
the state where they named the bucket.

Builds: design 47 G A-296

Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
2026-11-12 19:18:56 +01:00

38 lines
1.6 KiB
Go

package index
// The holders, states and buckets the indexer names, taken from its own manifest (module.json: its name, its `state`, its
// `reads`) and from the manifests of the holders it reads; a unit row checks them against the manifest
// (TestTheNamesAreTheManifests). No contract names a holder (novox/hq ADR 0625 §4, ADR 0634 §1).
const (
// Module is the indexer's own name; each reader names it from its own manifest.
Module = "mesh-delivery-indexer"
// The indexer's own states, with the revisions each keeps per key (module.json `state`).
CandidatesState = "candidates"
CandidatesHistory = 10
ModulesState = "modules"
ManifestsState = "manifests"
ManifestsHistory = 1
// VerdictsState is in verdicts.go.
VerdictsHistory = 5
PredefinedState = "predefined"
ConfigCandidatesState = "config-candidates"
PackagesState = "packages"
PackagesHistory = 5
TakenState = "taken"
PredefinedListKey = "list"
ForgeBridgeModule = "mesh-delivery-forge-bridge"
GateModule = "mesh-delivery-gate"
CheckerModule = "mesh-delivery-checker"
PreviewsBucket = CheckerModule + "_previews"
PreviewsHistory = 5
toolchainsState = "toolchains"
)
// ToolchainsBucket is the toolchains state of a build module (reads: mesh-build-go.toolchains, mesh-build-node.toolchains).
func ToolchainsBucket(module string) string { return module + "_" + toolchainsState }
// Bucket is the bus's bucket of the indexer's own state, `<module>_<state>`, module its credential's, never a constant
// (design 47 G A-296).
func Bucket(module, state string) string { return module + "_" + state }