Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArtifactReader ¶ added in v0.2.13
type ArtifactReader interface {
ListByCollection(
ctx context.Context,
ref collection.CollectionRef,
) ([]artifact.Artifact, error)
ListSuppressions(
ctx context.Context,
ref collection.CollectionRef,
) ([]artifact.Suppression, error)
}
type CollectionReader ¶ added in v0.2.13
type CollectionReader interface {
Get(
ctx context.Context,
ref collection.CollectionRef,
) (collection.Collection, error)
ListAttachments(
ctx context.Context,
ref collection.CollectionRef,
) ([]collection.Attachment, error)
}
type Publication ¶
type Publication struct {
Ref collection.CollectionRef
// ExpectedCatalogRevision is zero when the root has no prior publication.
// It prevents a concurrent refresh from replacing a newer catalog with an
// older source observation.
ExpectedCatalogRevision uint64
ExpectedCollectionRevision uint64
ExpectedAttachmentRevisions map[basespec.SourceID]uint64
ExpectedSourceRevisions map[basespec.SourceID]uint64
// SourceGenerations contains one confirmed generation for every Source
// whose attachment and Source are enabled at publication time. Publisher
// verifies that set against persisted metadata.
SourceGenerations map[basespec.SourceID]string
PlanFingerprint cryptoutil.Digest
DecoderFingerprint cryptoutil.Digest
Occurrences []catalog.Occurrence
ArtifactCreates []artifact.Artifact
ArtifactUpdates []artifact.SourceStateUpdate
Diagnostics []diagnostic.Diagnostic
PublishedAt time.Time
}
func (Publication) Validate ¶
func (p Publication) Validate() error
type Result ¶
type Result struct {
Catalog catalog.Snapshot
CreatedArtifacts []basespec.ArtifactID
UpdatedArtifacts []basespec.ArtifactID
Diagnostics []diagnostic.Diagnostic
Candidates int
}
type Runner ¶
type Runner interface {
Refresh(
ctx context.Context,
ref collection.CollectionRef,
plan discovery.Plan,
policy artifact.Policy,
) (Result, error)
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService( collections CollectionReader, catalogs catalog.Reader, sources source.Runtime, artifacts ArtifactReader, discoveryEngine *discovery.Engine, reconciler *artifact.Reconciler, publisher Publisher, timeClock clockutil.Clock, policy protection.RootPolicy, ) (*Service, error)
Click to show internal directories.
Click to hide internal directories.