acquisition

package
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2026 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Overview

Package acquisition composes provider and external-source acquisition above the small immutable Starmap client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProviderFetcher

func NewProviderFetcher(
	providers catalogs.ProvidersReader,
	opts ...sources.ProviderOption,
) *sources.ProviderFetcher

NewProviderFetcher returns the repository's opt-in concrete provider composition. Importing starmap alone never imports provider SDKs.

Types

type ImportResult

type ImportResult struct {
	// SourceGenerationID identifies the exact verified release generation.
	SourceGenerationID string
	// Publication identifies the locally committed reconciled generation.
	Publication starmap.Publication
	// Projection reports the post-commit human-workspace projection.
	Projection *projection.Result
}

ImportResult describes a verified release observation and any local generation it produced after authority-aware reconciliation.

type Option

type Option func(*options) error

Option configures one acquisition Syncer.

func WithCredentialResolver added in v0.4.0

func WithCredentialResolver(resolver sources.ProviderCredentialResolver) Option

WithCredentialResolver selects the deployment-owned catalog-acquisition credential resolver.

func WithProviderClientFactory

func WithProviderClientFactory(factory sources.ProviderClientFactory) Option

WithProviderClientFactory replaces the concrete provider-client composition. It is intended for source plugins, restricted deployments, and deterministic integration tests.

type Syncer

type Syncer struct {
	// contains filtered or unexported fields
}

Syncer observes configured sources, reconciles a complete candidate, and delegates serialized durable publication to a Client.

func New

func New(client *starmap.Client, opts ...Option) (*Syncer, error)

New constructs an explicit acquisition composition. It starts no goroutine and performs no source or filesystem work.

func (*Syncer) ImportRelease

func (s *Syncer) ImportRelease(
	ctx context.Context,
	release artifact.Release,
	verifier artifact.PublisherVerifier,
) (*ImportResult, error)

ImportRelease verifies a portable catalog release, reconciles it as a trusted low-authority observation with the current catalog and human workspace, then atomically publishes the result. Verification failure cannot mutate the client. The release generation itself is never activated wholesale.

func (*Syncer) PublishObservations added in v0.3.0

func (s *Syncer) PublishObservations(
	ctx context.Context,
	observations ...sources.Observation,
) (starmap.Publication, error)

PublishObservations reconciles caller-verified catalog observations and publishes the resulting immutable generation. This is the non-network acquisition seam for operator and tenant catalog facts.

func (*Syncer) Sync

func (s *Syncer) Sync(
	ctx context.Context,
	opts ...pkgsync.Option,
) (*pkgsync.Result, error)

Sync observes and reconciles sources. Dry runs require no writable store. Non-dry runs build inside Client.Update so candidate construction, store CAS, and atomic publication remain one serialized mutation transaction.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL