Documentation
¶
Overview ¶
Package renderoutput binds one rendered configuration to its exact plan and auxiliary artifacts under an authenticated immutable root.
Index ¶
- type ArtifactContentMismatchError
- type Authority
- type Counts
- type Delta
- type PreparedContentHash
- type Snapshot
- func NewSnapshot(authority *Authority, config string, plan *renderplan.Plan, ...) (*Snapshot, error)
- func NewSnapshotFromDocument(authority *Authority, document rendercontent.Document, plan *renderplan.Plan, ...) (*Snapshot, error)
- func ReusePrevious(authority *Authority, previous *Snapshot, plan *renderplan.Snapshot, ...) (*Snapshot, bool, error)
- func ReusePreviousDocument(authority *Authority, previous *Snapshot, document rendercontent.Document, ...) (*Snapshot, bool, error)
- func (s *Snapshot) ArtifactSnapshot() (*renderartifact.Snapshot, error)
- func (s *Snapshot) Config() (string, error)
- func (s *Snapshot) ConfigDocument() (rendercontent.Document, error)
- func (s *Snapshot) ContentChecksum() (string, error)
- func (s *Snapshot) ContentChecksumWith(prepared *PreparedContentHash) (string, error)
- func (s *Snapshot) Counts() (Counts, error)
- func (s *Snapshot) ExactEqual(other *Snapshot) (bool, error)
- func (s *Snapshot) PlanID() (string, error)
- func (s *Snapshot) PlanSnapshot() (*renderplan.Snapshot, error)
- func (s *Snapshot) SameRoot(other *Snapshot) (bool, error)
- func (s *Snapshot) ValidateAuthentication() error
- type Transaction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArtifactContentMismatchError ¶
type ArtifactContentMismatchError struct {
Path string
PlanBytes int
ArtifactBytes int
Written int64
Matched int
ReadOK bool
ExactRead bool
PlanDigestValid bool
IncrementalCommit bool
PlanFileInherited bool
PlanFileChanged bool
ArtifactInherited bool
ArtifactChanged bool
}
ArtifactContentMismatchError carries comparison evidence without file contents. IncrementalCommit is set only when the pair was rejected by an incremental commit; the four provenance fields are meaningful only then. Inherited means the delta carried no After for the path, so the base binding's value was re-validated; changed means the After differs from the base. An inherited, unchanged pair that mismatches was already inconsistent in the base.
func (*ArtifactContentMismatchError) Error ¶
func (e *ArtifactContentMismatchError) Error() string
type Authority ¶
type Authority struct {
// contains filtered or unexported fields
}
Authority owns one output lineage and its exact plan and artifact lineages.
func NewAuthority ¶
func NewAuthority(plans *renderplan.Authority, artifacts *renderartifact.Authority) (*Authority, error)
NewAuthority binds exact plan and artifact lineages to a new output lineage.
func (*Authority) ValidateAuthentication ¶
ValidateAuthentication verifies the authority's exact lineage bindings.
func (*Authority) ValidateSnapshot ¶
ValidateSnapshot proves that snapshot belongs to this output lineage.
type Counts ¶
type Counts struct {
Sections int
Backends int
Profiles int
Maps int
CRTLists int
Files int
Artifacts int
}
Counts records the exact cardinality of each output collection.
type Delta ¶
type Delta struct {
// contains filtered or unexported fields
}
Delta authenticates one atomic publication across config, plan, and artifacts.
func (*Delta) ValidateAuthentication ¶
ValidateAuthentication verifies the exact atomic base-to-next publication.
type PreparedContentHash ¶
type PreparedContentHash struct {
// contains filtered or unexported fields
}
PreparedContentHash is the document's share of a content checksum, hashed ahead of the snapshot that will carry it so the hashing overlaps the plan work that precedes the snapshot. It serves one snapshot whose document is the one it hashed.
func PrepareContentHash ¶
func PrepareContentHash(document rendercontent.Document) *PreparedContentHash
PrepareContentHash hashes the document part of the content checksum.
type Snapshot ¶
type Snapshot struct {
// contains filtered or unexported fields
}
Snapshot is one authenticated immutable render output.
func NewSnapshot ¶
func NewSnapshot( authority *Authority, config string, plan *renderplan.Plan, artifacts *renderartifact.Snapshot, previous *Snapshot, ) (*Snapshot, error)
NewSnapshot validates and seals one complete render output.
func NewSnapshotFromDocument ¶
func NewSnapshotFromDocument( authority *Authority, document rendercontent.Document, plan *renderplan.Plan, artifacts *renderartifact.Snapshot, previous *Snapshot, ) (*Snapshot, error)
NewSnapshotFromDocument validates and seals one authenticated document output.
func ReusePrevious ¶
func ReusePrevious( authority *Authority, previous *Snapshot, plan *renderplan.Snapshot, artifacts *renderartifact.Snapshot, ) (*Snapshot, bool, error)
ReusePrevious returns previous only when both supplied child roots are the exact roots it already binds. A false result requires full NewSnapshot validation.
func ReusePreviousDocument ¶
func ReusePreviousDocument( authority *Authority, previous *Snapshot, document rendercontent.Document, plan *renderplan.Snapshot, artifacts *renderartifact.Snapshot, ) (*Snapshot, bool, error)
ReusePreviousDocument returns previous only when the supplied document and both child snapshots are its exact authenticated roots.
func (*Snapshot) ArtifactSnapshot ¶
func (s *Snapshot) ArtifactSnapshot() (*renderartifact.Snapshot, error)
ArtifactSnapshot returns the authenticated auxiliary-artifact root.
func (*Snapshot) ConfigDocument ¶
func (s *Snapshot) ConfigDocument() (rendercontent.Document, error)
ConfigDocument returns the authenticated haproxy.cfg document root.
func (*Snapshot) ContentChecksum ¶
ContentChecksum returns the checksum authenticated by this output root.
func (*Snapshot) ContentChecksumWith ¶
func (s *Snapshot) ContentChecksumWith(prepared *PreparedContentHash) (string, error)
ContentChecksumWith is ContentChecksum continuing from a document hash prepared ahead of time; a prepared hash of another document is ignored.
func (*Snapshot) ExactEqual ¶
ExactEqual compares every final byte and declaration; hashes and IDs only reject.
func (*Snapshot) PlanSnapshot ¶
func (s *Snapshot) PlanSnapshot() (*renderplan.Snapshot, error)
PlanSnapshot returns the authenticated render-plan root.
func (*Snapshot) ValidateAuthentication ¶
ValidateAuthentication verifies the composite root in constant time.
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
Transaction validates and publishes three exact child transitions atomically.
func BeginTransaction ¶
func BeginTransaction( authority *Authority, base *Snapshot, document *rendercontent.DocumentDelta, plan *renderplan.Delta, artifacts *renderartifact.Delta, ) (*Transaction, error)
BeginTransaction binds exact child deltas to one output base.