package cacheimport
import "github.com/moby/buildkit/cache/remotecache/v1"
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, t solver.CacheExporterTarget) error
- type CacheChains
- func NewCacheChains() *CacheChains
- func (c *CacheChains) Add(dgst digest.Digest, deps [][]solver.CacheLink, results []solver.CacheExportResult) (solver.CacheExporterRecord, bool, error)
- func (c *CacheChains) Marshal(ctx context.Context) (*cacheimporttypes.CacheConfig, DescriptorProvider, error)
- 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
Functions ¶
func IntersectAll ¶
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 ¶
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) Info ¶
func (DescriptorProviderPair) ReaderAt ¶
func (p DescriptorProviderPair) ReaderAt(ctx context.Context, desc ocispecs.Descriptor) (content.ReaderAt, error)
func (DescriptorProviderPair) SnapshotLabels ¶
func (p DescriptorProviderPair) SnapshotLabels(descs []ocispecs.Descriptor, index int) map[string]string
func (DescriptorProviderPair) UnlazySession ¶
func (p DescriptorProviderPair) UnlazySession(desc ocispecs.Descriptor) session.Group
Source Files ¶
cachestorage.go chains.go parse.go utils.go
Directories ¶
| Path | Synopsis |
|---|---|
| cache/remotecache/v1/types |
- Version
- v0.28.1
- Published
- Mar 25, 2026
- Platform
- darwin/amd64
- Imports
- 23 packages
- Last checked
- 27 minutes ago –
Tools for package owners.