Documentation
¶
Index ¶
- type Components
- func (c *Components) Close() error
- func (c *Components) DecoderFingerprint() (cryptoutil.Digest, error)
- func (c *Components) EnsureProtectedTopology(ctx context.Context, declaration topology.Declaration) (topology.Installed, error)
- func (c *Components) GetManagedSourceState(ctx context.Context, rootID basespec.RootID, sourceID basespec.SourceID) (ManagedPackageResult, error)
- func (c *Components) GetTopologyHydration(ctx context.Context, installerName string) (topology.Hydration, bool, error)
- func (c *Components) HasDecoder(id basespec.DecoderID) bool
- func (c *Components) PublishManagedPackage(ctx context.Context, rootID basespec.RootID, sourceID basespec.SourceID, ...) (ManagedPackageResult, error)
- func (c *Components) PublishProtectedManagedPackage(ctx context.Context, rootID basespec.RootID, sourceID basespec.SourceID, ...) (ManagedPackageResult, error)
- func (c *Components) PutTopologyHydration(ctx context.Context, value topology.Hydration) error
- func (c *Components) RemoveManagedPackage(ctx context.Context, rootID basespec.RootID, sourceID basespec.SourceID, ...) (ManagedPackageResult, error)
- func (c *Components) RemoveProtectedManagedPackage(ctx context.Context, rootID basespec.RootID, sourceID basespec.SourceID, ...) (ManagedPackageResult, error)
- func (c *Components) ResetTopologyHydration(ctx context.Context, installerName string, rootID basespec.RootID) error
- func (c *Components) RootMutationPolicy() protection.RootPolicy
- type Config
- type ManagedPackageResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Components ¶
type Components struct {
Roots *root.Service
Sources *source.Service
Collections *collection.Service
Artifacts *artifact.Service
Refresh *refresh.Service
CollectionReader collection.Reader
ArtifactReader artifact.Reader
Catalogs catalog.Reader
Definitions definition.Reader
SourceRuntime source.Runtime
// contains filtered or unexported fields
}
func (*Components) Close ¶
func (c *Components) Close() error
func (*Components) DecoderFingerprint ¶ added in v0.2.13
func (c *Components) DecoderFingerprint() (cryptoutil.Digest, error)
DecoderFingerprint returns the exact decoder capability fingerprint used by newly published catalogs. Consumers use it to mark old catalogs stale after a decoder implementation or revision changes.
func (*Components) EnsureProtectedTopology ¶ added in v0.2.14
func (c *Components) EnsureProtectedTopology( ctx context.Context, declaration topology.Declaration, ) (topology.Installed, error)
EnsureProtectedTopology creates or verifies a declared protected Root and its generic Sources. Feature installers remain responsible for feature Collections, Artifacts, package validation, and package publication.
func (*Components) GetManagedSourceState ¶ added in v0.2.13
func (c *Components) GetManagedSourceState( ctx context.Context, rootID basespec.RootID, sourceID basespec.SourceID, ) (ManagedPackageResult, error)
GetManagedSourceState returns the current confirmed snapshot generation used as the optimistic token for managed package publication and removal. It does not expose Source configuration or the private acknowledged-generation metadata field.
func (*Components) GetTopologyHydration ¶ added in v0.2.15
func (*Components) HasDecoder ¶
func (c *Components) HasDecoder(id basespec.DecoderID) bool
func (*Components) PublishManagedPackage ¶ added in v0.2.13
func (c *Components) PublishManagedPackage( ctx context.Context, rootID basespec.RootID, sourceID basespec.SourceID, expectedSourceRevision uint64, publication source.ManagedPackagePublication, ) (ManagedPackageResult, error)
PublishManagedPackage publishes a package and advances the Source revision only when the resulting snapshot generation changed. The revision advance invalidates catalogs that observed the prior generation.
Source-side publication and SQLite metadata publication intentionally remain separate operations. If the package write succeeds but the revision advance conflicts, the caller receives the conflict and must reload before retrying.
func (*Components) PublishProtectedManagedPackage ¶ added in v0.2.14
func (c *Components) PublishProtectedManagedPackage( ctx context.Context, rootID basespec.RootID, sourceID basespec.SourceID, expectedSourceRevision uint64, publication source.ManagedPackagePublication, ) (ManagedPackageResult, error)
PublishProtectedManagedPackage is the trusted protected-topology package publication path. Artifact Store assigns no built-in meaning to this method. Application installers use it only for a Root declared protected by the application RootPolicy.
func (*Components) PutTopologyHydration ¶ added in v0.2.15
func (*Components) RemoveManagedPackage ¶ added in v0.2.13
func (c *Components) RemoveManagedPackage( ctx context.Context, rootID basespec.RootID, sourceID basespec.SourceID, expectedSourceRevision uint64, directory basespec.Locator, expectedGeneration string, ) (ManagedPackageResult, error)
RemoveManagedPackage removes one complete package and advances the Source revision after successful source-side removal.
func (*Components) RemoveProtectedManagedPackage ¶ added in v0.2.14
func (c *Components) RemoveProtectedManagedPackage( ctx context.Context, rootID basespec.RootID, sourceID basespec.SourceID, expectedSourceRevision uint64, directory basespec.Locator, expectedGeneration string, ) (ManagedPackageResult, error)
RemoveProtectedManagedPackage is the trusted protected-topology removal path. It is reserved for an explicit installer or update workflow.
func (*Components) ResetTopologyHydration ¶ added in v0.2.15
func (c *Components) ResetTopologyHydration( ctx context.Context, installerName string, rootID basespec.RootID, ) error
ResetTopologyHydration removes all local state for a binary-owned topology.
A reset is authorized only when rootID is the current protected Root or the persisted hydration record for installerName owns rootID. The second case is required when a newer binary changes its protected Root ID.
The hydration record intentionally survives this method. It is replaced only after the next complete installation succeeds, making interrupted upgrades converge on the next application start.
func (*Components) RootMutationPolicy ¶ added in v0.2.14
func (c *Components) RootMutationPolicy() protection.RootPolicy
type Config ¶
type Config struct {
BaseDirectory string
EmbeddedProviders map[string]fs.FS
AdditionalSources []source.Adapter
Decoders []discovery.Decoder
Clock clockutil.Clock
RootMutationPolicy protection.RootPolicy
FilesystemTraversalPolicy *fsdir.TraversalPolicy
}