Documentation
¶
Index ¶
- func IntersectAll[T comparable](funcs []func() map[T]struct{}) map[T]struct{}
- func NewCacheKeyStorage(cc *CacheChains, w worker.Worker) (solver.CacheKeyStorage, solver.CacheResultStorage, error)
- func Parse(configJSON []byte, provider DescriptorProvider, t solver.CacheExporterTarget) error
- func ParseConfig(config cacheimporttypes.CacheConfig, provider DescriptorProvider, ...) error
- type CacheChains
- type DescriptorProvider
- type DescriptorProviderPair
- func (p DescriptorProviderPair) Info(ctx context.Context, dgst digest.Digest) (content.Info, error)
- func (p DescriptorProviderPair) ReaderAt(ctx context.Context, desc ocispecs.Descriptor) (content.ReaderAt, error)
- func (p DescriptorProviderPair) SnapshotLabels(descs []ocispecs.Descriptor, index int) map[string]string
- func (p DescriptorProviderPair) UnlazySession(desc ocispecs.Descriptor) session.Group
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IntersectAll ¶ added in v0.25.0
func IntersectAll[T comparable]( funcs []func() map[T]struct{}, ) map[T]struct{}
func NewCacheKeyStorage ¶
func NewCacheKeyStorage(cc *CacheChains, w worker.Worker) (solver.CacheKeyStorage, solver.CacheResultStorage, error)
func Parse ¶
func Parse(configJSON []byte, provider DescriptorProvider, t solver.CacheExporterTarget) error
func ParseConfig ¶ added in v0.4.0
func ParseConfig(config cacheimporttypes.CacheConfig, provider DescriptorProvider, t solver.CacheExporterTarget) error
Types ¶
type CacheChains ¶
type CacheChains struct {
// contains filtered or unexported fields
}
func NewCacheChains ¶
func NewCacheChains() *CacheChains
func (*CacheChains) Add ¶
func (c *CacheChains) Add(dgst digest.Digest, deps [][]solver.CacheLink, results []solver.CacheExportResult) (solver.CacheExporterRecord, bool, error)
func (*CacheChains) Marshal ¶
func (c *CacheChains) Marshal(ctx context.Context) (*cacheimporttypes.CacheConfig, DescriptorProvider, error)
Marshal converts the cache chains structure into a cache config and a collection of providers for reading the results from.
Marshal aims to validate, normalize and sort the output to ensure a consistent digest (since cache configs are typically uploaded and stored in content-addressable OCI registries).
type DescriptorProvider ¶
type DescriptorProvider map[digest.Digest]DescriptorProviderPair
type DescriptorProviderPair ¶
type DescriptorProviderPair struct {
Descriptor ocispecs.Descriptor
Provider content.Provider
InfoProvider content.InfoProvider
}
func (DescriptorProviderPair) ReaderAt ¶ added in v0.13.0
func (p DescriptorProviderPair) ReaderAt(ctx context.Context, desc ocispecs.Descriptor) (content.ReaderAt, error)
func (DescriptorProviderPair) SnapshotLabels ¶ added in v0.13.0
func (p DescriptorProviderPair) SnapshotLabels(descs []ocispecs.Descriptor, index int) map[string]string
func (DescriptorProviderPair) UnlazySession ¶ added in v0.13.0
func (p DescriptorProviderPair) UnlazySession(desc ocispecs.Descriptor) session.Group
Click to show internal directories.
Click to hide internal directories.