Documentation
¶
Index ¶
- type ImageIdentifier
- type OCIIdentifier
- type ResolverType
- type Source
- func (is *Source) Identifier(ref string, attrs map[string]string, platform *pb.Platform) (source.Identifier, error)
- func (is *Source) Resolve(ctx context.Context, id source.Identifier, sm *session.Manager) (SourceInstance, error)
- func (is *Source) ResolveImageConfig(ctx context.Context, ref string, opt sourceresolver.Opt, sm *session.Manager, ...) (digest digest.Digest, config []byte, retErr error)
- func (is *Source) Schemes() []string
- type SourceInstance
- type SourceOpt
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 (*Source) Identifier ¶
func (*Source) Resolve ¶
func (is *Source) Resolve(ctx context.Context, id source.Identifier, sm *session.Manager) (SourceInstance, error)
func (*Source) ResolveImageConfig ¶
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
}
Click to show internal directories.
Click to hide internal directories.