Documentation
¶
Index ¶
- type Components
- func (c *Components) Close() error
- func (c *Components) DecoderFingerprint() (cryptoutil.Digest, error)
- func (c *Components) GetManagedSourceState(ctx context.Context, rootID basespec.RootID, sourceID basespec.SourceID) (ManagedPackageResult, 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) RemoveManagedPackage(ctx context.Context, rootID basespec.RootID, sourceID basespec.SourceID, ...) (ManagedPackageResult, error)
- 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) 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) 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) 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.