refresh

package
v0.2.10 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Publication

type Publication struct {
	RootID                  artifactstore.RootID
	ExpectedRootRevision    uint64
	ExpectedSourceRevisions map[artifactstore.SourceID]uint64
	SourceGenerations       map[artifactstore.SourceID]string
	Occurrences             []catalog.Occurrence
	RecordCreates           []record.Record
	RecordUpdates           []record.SourceStateUpdate
	Diagnostics             []artifactstore.Diagnostic
	PublishedAt             time.Time
}

func (Publication) Validate

func (p Publication) Validate() error

type Publisher

type Publisher interface {
	Publish(
		ctx context.Context,
		publication Publication,
	) (catalog.Snapshot, error)
}

type RecordReader

type RecordReader interface {
	ListByRoot(
		ctx context.Context,
		rootID artifactstore.RootID,
	) ([]record.Record, error)
}

type Result

type Result struct {
	Catalog        catalog.Snapshot
	CreatedRecords []artifactstore.RecordID
	UpdatedRecords []artifactstore.RecordID
	Diagnostics    []artifactstore.Diagnostic
	Candidates     int
}

type RootReader

type RootReader interface {
	Get(
		ctx context.Context,
		id artifactstore.RootID,
		includeDeleted bool,
	) (root.Root, error)

	ListAttachments(
		ctx context.Context,
		rootID artifactstore.RootID,
	) ([]root.Attachment, error)
}

type Runner

type Runner interface {
	Refresh(
		ctx context.Context,
		rootID artifactstore.RootID,
		plan discovery.Plan,
		policy record.Policy,
	) (Result, error)
}

type Service

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

func NewService

func NewService(
	roots RootReader,
	catalogs catalog.Reader,
	sources source.Runtime,
	records RecordReader,
	discoveryEngine *discovery.Engine,
	definitions definition.Repository,
	reconciler *record.Reconciler,
	publisher Publisher,
	clock artifactstore.Clock,
) (*Service, error)

func (*Service) Refresh

func (s *Service) Refresh(
	ctx context.Context,
	rootID artifactstore.RootID,
	plan discovery.Plan,
	policy record.Policy,
) (Result, error)

Jump to

Keyboard shortcuts

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