Documentation
¶
Overview ¶
Package catalogwalk owns streaming validation of authenticated terminal catalog generations. Callers reduce entries into bounded facts and discard those provisional facts unless the walk returns a complete generation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidTerminalGenerationWalk = errors.New("terminal catalog generation walk is invalid") ErrTerminalGenerationIntegrity = errors.New("terminal catalog generation failed integrity validation") )
Functions ¶
This section is empty.
Types ¶
type BudgetLimit ¶
type BudgetLimit uint8
BudgetLimit identifies the local resource dimension that stopped a walk. Exhaustion is proof inability, not catalog corruption.
const ( BudgetWithinLimits BudgetLimit = iota BudgetAuthenticatedPages BudgetEntries BudgetAuthenticatedMetadata )
func (BudgetLimit) Valid ¶
func (limit BudgetLimit) Valid() bool
type Limits ¶
type Limits struct {
// contains filtered or unexported fields
}
Limits bounds aggregate accepted work across any number of directory walks.
type Meter ¶
type Meter struct {
// contains filtered or unexported fields
}
Meter applies one aggregate limit across a multi-directory proof.
type TerminalGeneration ¶
type TerminalGeneration struct {
Directory catalog.CommittedDirectory
Validated bool
Exhausted BudgetLimit
// contains filtered or unexported fields
}
TerminalGeneration is usable proof only when Validated is true. Source exclusions do not invalidate the authenticated catalog or its terminal page.
func ReadTerminalGeneration ¶
func ReadTerminalGeneration( ctx context.Context, cursor catalog.DirectoryPageCursor, expectedShare catalog.ShareInstance, expectedDirectory catalog.DirectoryID, meter *Meter, visit func(catalog.Entry) error, ) (result TerminalGeneration, resultErr error)
ReadTerminalGeneration validates one forward-only generation against its expected authenticated scope. visit must only update disposable, bounded reducer state: entries remain provisional until this function returns a complete generation.
func (TerminalGeneration) PageCommitments ¶
func (generation TerminalGeneration) PageCommitments() []catalog.PageCommitment
PageCommitments returns the authenticated chain needed to replay the same generation without exposing mutable walker state.