57 lines
3.4 KiB
Go
57 lines
3.4 KiB
Go
package index
|
|
|
|
import (
|
|
mcc "git.novox.be/novox/mesh-contracts/health-and-repair/go/clients/meshconditionsclient"
|
|
|
|
"git.novox.be/novox/mesh-delivery/sdk/graph"
|
|
"git.novox.be/novox/mesh-sdk/go/views"
|
|
)
|
|
|
|
// MarksBucket is the indexer's state of what its views family said each state up to.
|
|
const MarksBucket = Module + "_" + views.MarksState
|
|
|
|
// FirstViewTools are the indexer's first-view tools (ADR 0621 §1, ADR 0622 §1, ADR 0631 §1): the tool, the state it answers, and
|
|
// the words of what that state holds. Each answers only its callers list (CallersEnv), which the manifest writes.
|
|
var FirstViewTools = []ViewedTool{
|
|
{Tool: "manifests", State: "manifests", Words: "every manifest the indexer keeps, by its digest."},
|
|
{Tool: "modules", State: "modules", Words: "every module the indexer holds, its fingerprint, inputs and manifest digest."},
|
|
{Tool: "verdicts", State: VerdictsState, Words: "the judge's verdict on each manifest: accepted, waiting or refused."},
|
|
{Tool: "graph", State: graph.State, Words: "the module graph: each module's build, provision and verb edges, whose verb edges a want waits on."},
|
|
}
|
|
|
|
// ReadTools are the indexer's ordinary read tools, one per state its readers read (design 25 § 12.2).
|
|
var ReadTools = []ViewedTool{
|
|
{Tool: "indexer_read_manifests", State: "manifests", Words: "every manifest the indexer keeps, by its digest."},
|
|
{Tool: "indexer_read_modules", State: "modules", Words: "every module the indexer holds, its fingerprint, inputs and manifest digest."},
|
|
{Tool: "indexer_read_predefined", State: PredefinedState, Words: "the predefined config values of each module on the trunk."},
|
|
{Tool: "indexer_read_config_candidates", State: ConfigCandidatesState, Words: "the config declarations of each open pull request."},
|
|
{Tool: "indexer_read_candidates", State: "candidates", Words: "the candidate groups: the pull requests sharing a branch, their heads and the modules each touches."},
|
|
{Tool: "indexer_read_packages", State: PackagesState, Words: "the published packages per series."},
|
|
{Tool: "indexer_read_graph", State: graph.State, Words: "the module graph: each module's build and provision edges."},
|
|
{Tool: "indexer_read_heard", State: HeardState, Words: "the forge messages the indexer heard and what it did with each."},
|
|
{Tool: "indexer_read_taken", State: "taken", Words: "each repository's merge the indexer took in last."},
|
|
{Tool: "indexer_read_findings", State: mcc.FindingsState, Words: "the indexer's findings, which the condition keeper raises and clears."},
|
|
{Tool: "indexer_read_seat_definitions", State: SeatDefinitionsState, Words: "the seat definitions the trunk's and each open pull request's contracts modules hold, resolved, or why one does not parse."},
|
|
}
|
|
|
|
// ViewedTool is one tool over one state of the indexer's.
|
|
type ViewedTool struct {
|
|
Tool, State, Words string
|
|
}
|
|
|
|
// ViewedStates are the states the indexer's views family says, each by its bucket: the ones its readers read.
|
|
var ViewedStates = map[string]string{
|
|
"manifests": ManifestsBucket,
|
|
"modules": ModulesBucket,
|
|
VerdictsState: VerdictsBucket,
|
|
PredefinedState: PredefinedBucket,
|
|
ConfigCandidatesState: ConfigCandidatesBucket,
|
|
"candidates": CandidatesBucket,
|
|
PackagesState: PackagesBucket,
|
|
graph.State: GraphBucket,
|
|
HeardState: HeardBucket,
|
|
"taken": TakenBucket,
|
|
mcc.FindingsState: mcc.FindingsBucket(Module),
|
|
SeatDefinitionsState: SeatDefinitionsBucket,
|
|
}
|