Documentation
¶
Overview ¶
Package ordinaryoutput owns construction-time policy for ordinary native receive output. It deliberately contains no persisted receive contract.
Index ¶
- Constants
- Variables
- type ArtifactPath
- type ArtifactPathProjection
- type ArtifactPathProjector
- type ArtifactProjectionKind
- type ArtifactRejectReason
- type AuthenticatedSourceNode
- type OpaqueSelectionTarget
- type Selection
- func NewCatalogPathSelection(share catalog.ShareInstance, syntheticRoot catalog.DirectoryID, ...) (Selection, error)
- func NewOpaqueNodeSelection(share catalog.ShareInstance, syntheticRoot catalog.DirectoryID, ...) (Selection, error)
- func NewWholeShareSelection(share catalog.ShareInstance, syntheticRoot catalog.DirectoryID, ...) (Selection, error)
- type SelectionMode
- type ShapeCatalog
- type ShapeDecision
- func NewCompleteDirectoryShape(directory catalog.DirectoryID, sourcePath string) (ShapeDecision, error)
- func NewPartialDirectoryShape(directory catalog.DirectoryID, sourcePath string) (ShapeDecision, error)
- func NewSingleFileShape(file catalog.FileID, sourcePath string) (ShapeDecision, error)
- func NewSyntheticSelectionShape(reason ShapeFallbackReason) (ShapeDecision, error)
- func ResolveShape(ctx context.Context, source ShapeCatalog, selection Selection, ...) (ShapeDecision, error)
- func (decision ShapeDecision) DirectoryID() catalog.DirectoryID
- func (decision ShapeDecision) FallbackReason() ShapeFallbackReason
- func (decision ShapeDecision) FileID() catalog.FileID
- func (decision ShapeDecision) Kind() ShapeKind
- func (decision ShapeDecision) PreferredName() string
- func (decision ShapeDecision) SourcePath() string
- func (decision ShapeDecision) Valid() bool
- type ShapeFallbackReason
- type ShapeKind
- type ShapeProbeBudget
- func (budget ShapeProbeBudget) AuthenticatedMetadataBytes() uint64
- func (budget ShapeProbeBudget) AuthenticatedPages() uint32
- func (budget ShapeProbeBudget) Depth() uint32
- func (budget ShapeProbeBudget) DirectoryRequests() uint32
- func (budget ShapeProbeBudget) Entries() uint32
- func (budget ShapeProbeBudget) Valid() bool
- type ShapeTrace
- type ShapeTraceFunc
- type ShapeTraceStage
- type ShapeTracer
- type SourceCatalogPath
- type SourceNodeRole
Constants ¶
const ( // OrdinaryOutputPolicyVersion separates active operations when any ordinary // layout, lookup, suffix, reservation, cleanup, or shape-budget semantic changes. OrdinaryOutputPolicyVersion = uint8(1) // MaximumResultNameReservationAttemptsV1 admits collision indexes 0 through 31. MaximumResultNameReservationAttemptsV1 = uint32(32) // MaximumLiveCleanupTicketsPerBindV1 bounds one binding's cleanup work, not the // journal's size. Later bindings continue draining the remaining tickets. MaximumLiveCleanupTicketsPerBindV1 = uint32(256) )
Variables ¶
var ( ErrInvalidSourceCatalogPath = errors.New("ordinary output source catalog path is invalid") ErrInvalidArtifactPath = errors.New("ordinary output artifact path is invalid") ErrInvalidAuthenticatedSource = errors.New("ordinary output authenticated source node is invalid") ErrInvalidArtifactProjector = errors.New("ordinary output artifact path projector is invalid") )
var DefaultShapeProbeBudgetV1 = mustShapeProbeBudget( 32, 128, 32_768, 8*1024*1024, catalog.MaxPathDepth, )
var ErrInvalidShapeResolution = errors.New("ordinary output shape resolution is invalid")
Functions ¶
This section is empty.
Types ¶
type ArtifactPath ¶
type ArtifactPath struct {
// contains filtered or unexported fields
}
ArtifactPath is a logical output coordinate. It never contains the collision-adjusted physical reservation name.
func NewArtifactPath ¶
func NewArtifactPath(value string) (ArtifactPath, error)
func (ArtifactPath) String ¶
func (path ArtifactPath) String() string
func (ArtifactPath) Valid ¶
func (path ArtifactPath) Valid() bool
type ArtifactPathProjection ¶
type ArtifactPathProjection struct {
// contains filtered or unexported fields
}
func MaterializeArtifactProjection ¶
func MaterializeArtifactProjection(path ArtifactPath) (ArtifactPathProjection, error)
MaterializeArtifactProjection constructs one already-validated logical artifact claim. Production transfer code normally obtains this from Project; the constructor keeps executor tests explicit without exposing struct fields.
func TraverseOnlyProjection ¶
func TraverseOnlyProjection() ArtifactPathProjection
TraverseOnlyProjection constructs the absence of destination authority for a source directory that is needed solely to authenticate selected ancestry.
func (ArtifactPathProjection) ArtifactPath ¶
func (projection ArtifactPathProjection) ArtifactPath() (ArtifactPath, bool)
func (ArtifactPathProjection) Kind ¶
func (projection ArtifactPathProjection) Kind() ArtifactProjectionKind
func (ArtifactPathProjection) RejectReason ¶
func (projection ArtifactPathProjection) RejectReason() ArtifactRejectReason
type ArtifactPathProjector ¶
type ArtifactPathProjector struct {
// contains filtered or unexported fields
}
ArtifactPathProjector is immutable after construction. Project has no state, I/O, or destination authority.
func NewArtifactPathProjector ¶
func NewArtifactPathProjector( syntheticRoot catalog.DirectoryID, artifact receivecontract.ArtifactSpec, ) (ArtifactPathProjector, error)
NewArtifactPathProjector validates the canonical artifact once. There is no constructor that accepts a free-form preferred name, so receivecontract remains the only naming authority.
func (ArtifactPathProjector) Project ¶
func (projector ArtifactPathProjector) Project(node AuthenticatedSourceNode) ArtifactPathProjection
type ArtifactProjectionKind ¶
type ArtifactProjectionKind uint8
const ( ArtifactTraverseOnly ArtifactProjectionKind = iota + 1 ArtifactMaterialize ArtifactReject )
func (ArtifactProjectionKind) Valid ¶
func (kind ArtifactProjectionKind) Valid() bool
type ArtifactRejectReason ¶
type ArtifactRejectReason uint8
const ( ArtifactRejectNone ArtifactRejectReason = iota ArtifactRejectInvalidSource ArtifactRejectWrongRole ArtifactRejectWrongKind ArtifactRejectWrongIdentity )
func (ArtifactRejectReason) Valid ¶
func (reason ArtifactRejectReason) Valid() bool
type AuthenticatedSourceNode ¶
type AuthenticatedSourceNode struct {
// contains filtered or unexported fields
}
AuthenticatedSourceNode keeps sender identity and source ancestry independent from the projected artifact coordinate.
func NewAuthenticatedDirectorySourceNode ¶
func NewAuthenticatedDirectorySourceNode( directory catalog.DirectoryID, sourcePath SourceCatalogPath, role SourceNodeRole, ) (AuthenticatedSourceNode, error)
func NewAuthenticatedFileSourceNode ¶
func NewAuthenticatedFileSourceNode( file catalog.FileID, sourcePath SourceCatalogPath, role SourceNodeRole, ) (AuthenticatedSourceNode, error)
func (AuthenticatedSourceNode) Kind ¶
func (node AuthenticatedSourceNode) Kind() catalog.NodeKind
func (AuthenticatedSourceNode) NodeID ¶
func (node AuthenticatedSourceNode) NodeID() catalog.NodeID
func (AuthenticatedSourceNode) Role ¶
func (node AuthenticatedSourceNode) Role() SourceNodeRole
func (AuthenticatedSourceNode) SourcePath ¶
func (node AuthenticatedSourceNode) SourcePath() SourceCatalogPath
type OpaqueSelectionTarget ¶
type OpaqueSelectionTarget struct {
// contains filtered or unexported fields
}
func NewOpaqueDirectoryTarget ¶
func NewOpaqueDirectoryTarget( directory catalog.DirectoryID, selected bool, ) (OpaqueSelectionTarget, error)
func NewOpaqueFileTarget ¶
func NewOpaqueFileTarget(file catalog.FileID, selected bool) (OpaqueSelectionTarget, error)
func (OpaqueSelectionTarget) Kind ¶
func (target OpaqueSelectionTarget) Kind() catalog.NodeKind
func (OpaqueSelectionTarget) NodeID ¶
func (target OpaqueSelectionTarget) NodeID() catalog.NodeID
func (OpaqueSelectionTarget) Selected ¶
func (target OpaqueSelectionTarget) Selected() bool
type Selection ¶
type Selection struct {
// contains filtered or unexported fields
}
func NewCatalogPathSelection ¶
func NewCatalogPathSelection( share catalog.ShareInstance, syntheticRoot catalog.DirectoryID, digest [32]byte, targets []string, ) (Selection, error)
func NewOpaqueNodeSelection ¶
func NewOpaqueNodeSelection( share catalog.ShareInstance, syntheticRoot catalog.DirectoryID, digest [32]byte, defaultSelected bool, targets []OpaqueSelectionTarget, ) (Selection, error)
func NewWholeShareSelection ¶
func NewWholeShareSelection( share catalog.ShareInstance, syntheticRoot catalog.DirectoryID, digest [32]byte, ) (Selection, error)
type SelectionMode ¶
type SelectionMode uint8
SelectionMode is deliberately local: the parent transfer package lowers its closed canonical selection state into this immutable proof input.
const ( SelectionCatalogPaths SelectionOpaqueNodes )
type ShapeCatalog ¶
type ShapeCatalog interface {
OpenDirectoryPages(context.Context, catalog.DirectoryID) (catalog.DirectoryPageCursor, error)
}
type ShapeDecision ¶
type ShapeDecision struct {
// contains filtered or unexported fields
}
ShapeDecision contains only the immutable scalar result of construction-time proof. No generation, page, target list, manifest, or content fact survives.
func NewCompleteDirectoryShape ¶
func NewCompleteDirectoryShape( directory catalog.DirectoryID, sourcePath string, ) (ShapeDecision, error)
func NewPartialDirectoryShape ¶
func NewPartialDirectoryShape( directory catalog.DirectoryID, sourcePath string, ) (ShapeDecision, error)
func NewSingleFileShape ¶
func NewSingleFileShape(file catalog.FileID, sourcePath string) (ShapeDecision, error)
func NewSyntheticSelectionShape ¶
func NewSyntheticSelectionShape(reason ShapeFallbackReason) (ShapeDecision, error)
func ResolveShape ¶
func ResolveShape( ctx context.Context, source ShapeCatalog, selection Selection, budget ShapeProbeBudget, tracer ShapeTracer, ) (ShapeDecision, error)
func (ShapeDecision) DirectoryID ¶
func (decision ShapeDecision) DirectoryID() catalog.DirectoryID
func (ShapeDecision) FallbackReason ¶
func (decision ShapeDecision) FallbackReason() ShapeFallbackReason
func (ShapeDecision) FileID ¶
func (decision ShapeDecision) FileID() catalog.FileID
func (ShapeDecision) Kind ¶
func (decision ShapeDecision) Kind() ShapeKind
func (ShapeDecision) PreferredName ¶
func (decision ShapeDecision) PreferredName() string
func (ShapeDecision) SourcePath ¶
func (decision ShapeDecision) SourcePath() string
func (ShapeDecision) Valid ¶
func (decision ShapeDecision) Valid() bool
type ShapeFallbackReason ¶
type ShapeFallbackReason uint8
const ( ShapeFallbackNone ShapeFallbackReason = iota ShapeFallbackMultipleRoots ShapeFallbackSyntheticNearestAncestor ShapeFallbackOpaqueAncestryUnprovable ShapeFallbackPageBudget ShapeFallbackEntryBudget ShapeFallbackMetadataBudget ShapeFallbackDepthBudget ShapeFallbackDirectoryRequestBudget ShapeFallbackUnsupportedRuleProof ShapeFallbackUnresolvedTarget ShapeFallbackIncompleteGeneration )
func (ShapeFallbackReason) Valid ¶
func (reason ShapeFallbackReason) Valid() bool
type ShapeProbeBudget ¶
type ShapeProbeBudget struct {
// contains filtered or unexported fields
}
ShapeProbeBudget bounds authenticated metadata work before shape resolution freezes the synthetic ordinary-output fallback.
func NewShapeProbeBudget ¶
func (ShapeProbeBudget) AuthenticatedMetadataBytes ¶
func (budget ShapeProbeBudget) AuthenticatedMetadataBytes() uint64
func (ShapeProbeBudget) AuthenticatedPages ¶
func (budget ShapeProbeBudget) AuthenticatedPages() uint32
func (ShapeProbeBudget) Depth ¶
func (budget ShapeProbeBudget) Depth() uint32
func (ShapeProbeBudget) DirectoryRequests ¶
func (budget ShapeProbeBudget) DirectoryRequests() uint32
func (ShapeProbeBudget) Entries ¶
func (budget ShapeProbeBudget) Entries() uint32
func (ShapeProbeBudget) Valid ¶
func (budget ShapeProbeBudget) Valid() bool
type ShapeTrace ¶
type ShapeTrace struct {
Stage ShapeTraceStage
ProtocolSessionID protocolsession.ProtocolSessionID
SelectionDigest [32]byte
Kind ShapeKind
Fallback ShapeFallbackReason
DirectoryRequests uint32
AuthenticatedPages uint32
AuthenticatedEntries uint32
AuthenticatedMetadataBytes uint64
}
type ShapeTraceFunc ¶
type ShapeTraceFunc func(ShapeTrace)
func (ShapeTraceFunc) TraceOrdinaryOutputShape ¶
func (trace ShapeTraceFunc) TraceOrdinaryOutputShape(event ShapeTrace)
type ShapeTraceStage ¶
type ShapeTraceStage uint8
const ( ShapeProbeStarted ShapeTraceStage = iota + 1 ShapeProofFrozen ShapeSyntheticFallback )
type ShapeTracer ¶
type ShapeTracer interface {
TraceOrdinaryOutputShape(ShapeTrace)
}
func BindShapeTracerToSession ¶
func BindShapeTracerToSession( session protocolsession.ProtocolSessionID, tracer ShapeTracer, ) ShapeTracer
BindShapeTracerToSession adds stable correlation at the authenticated runtime boundary without making session identity part of shape authority.
type SourceCatalogPath ¶
type SourceCatalogPath struct {
// contains filtered or unexported fields
}
SourceCatalogPath is an authenticated sender-side coordinate. The synthetic root is represented only by EmptySourceCatalogPath.
func EmptySourceCatalogPath ¶
func EmptySourceCatalogPath() SourceCatalogPath
func NewSourceCatalogPath ¶
func NewSourceCatalogPath(value string) (SourceCatalogPath, error)
func (SourceCatalogPath) IsRoot ¶
func (path SourceCatalogPath) IsRoot() bool
func (SourceCatalogPath) String ¶
func (path SourceCatalogPath) String() string
func (SourceCatalogPath) Valid ¶
func (path SourceCatalogPath) Valid() bool
type SourceNodeRole ¶
type SourceNodeRole uint8
const ( SourceNodeSelected SourceNodeRole = iota + 1 SourceNodeConnectsSelection )
func (SourceNodeRole) Valid ¶
func (role SourceNodeRole) Valid() bool