package remotecache
import "github.com/moby/buildkit/cache/remotecache"
Index ¶
- Constants
- type CacheType
- type Config
- type DistributionSourceLabelSetter
- type ExportableCache
- func NewExportableCache(oci bool, imageManifest bool) (*ExportableCache, error)
- func (ec *ExportableCache) AddCacheBlob(blob ocispecs.Descriptor)
- func (ec *ExportableCache) FinalizeCache(ctx context.Context)
- func (ec *ExportableCache) MarshalJSON() ([]byte, error)
- func (ec *ExportableCache) MediaType() string
- func (ec *ExportableCache) SetConfig(config ocispecs.Descriptor)
- type Exporter
- type Importer
- type ResolveCacheExporterFunc
- type ResolveCacheImporterFunc
Constants ¶
const ( // ExportResponseManifestDesc is a key for the map returned from Exporter.Finalize. // The map value is a JSON string of an OCI desciptor of a manifest. ExporterResponseManifestDesc = "cache.manifest" )
Types ¶
type CacheType ¶
type CacheType int
func (CacheType) String ¶
type Config ¶
type Config struct { Compression compression.Config }
type DistributionSourceLabelSetter ¶
type DistributionSourceLabelSetter interface { SetDistributionSourceLabel(context.Context, digest.Digest) error SetDistributionSourceAnnotation(desc ocispecs.Descriptor) ocispecs.Descriptor }
type ExportableCache ¶
type ExportableCache struct { // This cache describes two distinct styles of exportable cache, one is an Index (or Manifest List) of blobs, // or as an artifact using the OCI image manifest format. ExportedManifest ocispecs.Manifest ExportedIndex ocispecs.Index CacheType CacheType OCI bool }
func NewExportableCache ¶
func NewExportableCache(oci bool, imageManifest bool) (*ExportableCache, error)
func (*ExportableCache) AddCacheBlob ¶
func (ec *ExportableCache) AddCacheBlob(blob ocispecs.Descriptor)
func (*ExportableCache) FinalizeCache ¶
func (ec *ExportableCache) FinalizeCache(ctx context.Context)
func (*ExportableCache) MarshalJSON ¶
func (ec *ExportableCache) MarshalJSON() ([]byte, error)
func (*ExportableCache) MediaType ¶
func (ec *ExportableCache) MediaType() string
func (*ExportableCache) SetConfig ¶
func (ec *ExportableCache) SetConfig(config ocispecs.Descriptor)
type Exporter ¶
type Exporter interface { solver.CacheExporterTarget // Name uniquely identifies the exporter Name() string // Finalize finalizes and return metadata that are returned to the client // e.g. ExporterResponseManifestDesc Finalize(ctx context.Context) (map[string]string, error) Config() Config }
func NewExporter ¶
func NewExporter(ingester content.Ingester, ref string, oci bool, imageManifest bool, compressionConfig compression.Config) Exporter
type Importer ¶
type Importer interface { Resolve(ctx context.Context, desc ocispecs.Descriptor, id string, w worker.Worker) (solver.CacheManager, error) }
func NewImporter ¶
type ResolveCacheExporterFunc ¶
type ResolveCacheExporterFunc func(ctx context.Context, g session.Group, attrs map[string]string) (Exporter, error)
type ResolveCacheImporterFunc ¶
type ResolveCacheImporterFunc func(ctx context.Context, g session.Group, attrs map[string]string) (Importer, ocispecs.Descriptor, error)
ResolveCacheImporterFunc returns importer and descriptor.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
cache/remotecache/azblob | |
cache/remotecache/gha | |
cache/remotecache/inline | |
cache/remotecache/local | |
cache/remotecache/registry | |
cache/remotecache/s3 | |
cache/remotecache/v1 |
- Version
- v0.19.0-rc3
- Published
- Jan 17, 2025
- Platform
- js/wasm
- Imports
- 25 packages
- Last checked
- 31 minutes ago –
Tools for package owners.