containersource

package
v0.19.11 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageIdentifier

type ImageIdentifier struct {
	Reference   reference.Spec
	Platform    *ocispecs.Platform
	ResolveMode resolver.ResolveMode
	RecordType  client.UsageRecordType
	LayerLimit  *int
}

func NewImageIdentifier

func NewImageIdentifier(str string) (*ImageIdentifier, error)

func (*ImageIdentifier) Capture

func (id *ImageIdentifier) Capture(c *provenance.Capture, pin string) error

func (*ImageIdentifier) Scheme

func (*ImageIdentifier) Scheme() string

type OCIIdentifier

type OCIIdentifier struct {
	Reference  reference.Spec
	Platform   *ocispecs.Platform
	SessionID  string
	StoreID    string
	LayerLimit *int
}

func NewOCIIdentifier

func NewOCIIdentifier(str string) (*OCIIdentifier, error)

func (*OCIIdentifier) Capture

func (id *OCIIdentifier) Capture(c *provenance.Capture, pin string) error

func (*OCIIdentifier) Scheme

func (*OCIIdentifier) Scheme() string

type ResolverType

type ResolverType int
const (
	ResolverTypeRegistry ResolverType = iota
	ResolverTypeOCILayout
)

type Source

type Source struct {
	SourceOpt
}

func NewSource

func NewSource(opt SourceOpt) (*Source, error)

func (*Source) Identifier

func (is *Source) Identifier(ref string, attrs map[string]string, platform *pb.Platform) (source.Identifier, error)

func (*Source) Resolve

func (is *Source) Resolve(ctx context.Context, id source.Identifier, sm *session.Manager) (SourceInstance, error)

func (*Source) ResolveImageConfig

func (is *Source) ResolveImageConfig(ctx context.Context, ref string, opt sourceresolver.Opt, sm *session.Manager, g session.Group) (digest digest.Digest, config []byte, retErr error)

func (*Source) Schemes

func (is *Source) Schemes() []string

type SourceInstance

type SourceInstance interface {
	// Snapshot creates a cache ref for the instance. May return a nil ref if source points to empty content, e.g. image without any layers.
	Snapshot(ctx context.Context, g session.Group) (cache.ImmutableRef, error)
}

SourceInstance represents a cacheable vertex created by a Source.

type SourceOpt

type SourceOpt struct {
	Snapshotter   snapshot.Snapshotter
	ContentStore  content.Store
	CacheAccessor cache.Accessor
	ImageStore    images.Store // optional
	RegistryHosts docker.RegistryHosts
	ResolverType
	LeaseManager leases.Manager
}

Jump to

Keyboard shortcuts

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