package cache
import "github.com/moby/buildkit/cache"
Index ¶
- Variables
- func CachePolicyDefault(m withMetadata) error
- func CachePolicyRetain(m withMetadata) error
- func GetCreatedAt(si *metadata.StorageItem) time.Time
- func GetDescription(si *metadata.StorageItem) string
- func GetLayerType(m withMetadata) string
- func GetRecordType(m withMetadata) client.UsageRecordType
- func HasCachePolicyRetain(m withMetadata) bool
- func IsNotFound(err error) bool
- func MigrateV2(ctx context.Context, from, to string, cs content.Store, s snapshot.Snapshotter, lm leases.Manager) error
- func SetLayerType(m withMetadata, value string) error
- func SetRecordType(m withMetadata, value client.UsageRecordType) error
- type Accessor
- type Controller
- type DescHandler
- type DescHandlerKey
- type DescHandlers
- type ExternalRefChecker
- type ExternalRefCheckerFunc
- type ImmutableRef
- type Manager
- type ManagerOpt
- type Mountable
- type MutableRef
- type NeedsRemoteProvidersError
- type Ref
- type RefInfo
- type RefOption
- func WithCreationTime(tm time.Time) RefOption
- func WithDescription(descr string) RefOption
- func WithImageRef(imageRef string) RefOption
- func WithRecordType(t client.UsageRecordType) RefOption
- type Unlazier
Variables ¶
var NoUpdateLastUsed noUpdateLastUsed
Functions ¶
func CachePolicyDefault ¶
func CachePolicyDefault(m withMetadata) error
func CachePolicyRetain ¶
func CachePolicyRetain(m withMetadata) error
func GetCreatedAt ¶
func GetCreatedAt(si *metadata.StorageItem) time.Time
func GetDescription ¶
func GetDescription(si *metadata.StorageItem) string
func GetLayerType ¶
func GetLayerType(m withMetadata) string
func GetRecordType ¶
func GetRecordType(m withMetadata) client.UsageRecordType
func HasCachePolicyRetain ¶
func HasCachePolicyRetain(m withMetadata) bool
func IsNotFound ¶
func MigrateV2 ¶
func MigrateV2(ctx context.Context, from, to string, cs content.Store, s snapshot.Snapshotter, lm leases.Manager) error
func SetLayerType ¶
func SetRecordType ¶
func SetRecordType(m withMetadata, value client.UsageRecordType) error
Types ¶
type Accessor ¶
type Accessor interface {
GetByBlob(ctx context.Context, desc ocispec.Descriptor, parent ImmutableRef, opts ...RefOption) (ImmutableRef, error)
Get(ctx context.Context, id string, opts ...RefOption) (ImmutableRef, error)
New(ctx context.Context, parent ImmutableRef, s session.Group, opts ...RefOption) (MutableRef, error)
GetMutable(ctx context.Context, id string, opts ...RefOption) (MutableRef, error) // Rebase?
IdentityMapping() *idtools.IdentityMapping
Metadata(string) *metadata.StorageItem
}
type Controller ¶
type Controller interface {
DiskUsage(ctx context.Context, info client.DiskUsageInfo) ([]*client.UsageInfo, error)
Prune(ctx context.Context, ch chan client.UsageInfo, info ...client.PruneInfo) error
}
type DescHandler ¶
type DescHandler struct {
Provider func(session.Group) content.Provider
Progress progress.Controller
SnapshotLabels map[string]string
}
type DescHandlerKey ¶
type DescHandlers ¶
type DescHandlers map[digest.Digest]*DescHandler
type ExternalRefChecker ¶
type ExternalRefCheckerFunc ¶
type ExternalRefCheckerFunc func() (ExternalRefChecker, error)
type ImmutableRef ¶
type ImmutableRef interface {
Ref
Parent() ImmutableRef
Clone() ImmutableRef
Info() RefInfo
Extract(ctx context.Context, s session.Group) error // +progress
GetRemote(ctx context.Context, createIfNeeded bool, compressionType compression.Type, forceCompression bool, s session.Group) (*solver.Remote, error)
}
type Manager ¶
type Manager interface {
Accessor
Controller
Close() error
}
func NewManager ¶
func NewManager(opt ManagerOpt) (Manager, error)
type ManagerOpt ¶
type ManagerOpt struct {
Snapshotter snapshot.Snapshotter
MetadataStore *metadata.Store
ContentStore content.Store
LeaseManager leases.Manager
PruneRefChecker ExternalRefCheckerFunc
GarbageCollect func(ctx context.Context) (gc.Stats, error)
Applier diff.Applier
Differ diff.Comparer
}
type Mountable ¶
type Mountable interface {
Mount(ctx context.Context, readonly bool, s session.Group) (snapshot.Mountable, error)
}
type MutableRef ¶
type MutableRef interface {
Ref
Commit(context.Context) (ImmutableRef, error)
}
type NeedsRemoteProvidersError ¶
func (NeedsRemoteProvidersError) Error ¶
func (m NeedsRemoteProvidersError) Error() string
type Ref ¶
type Ref interface {
Mountable
ID() string
Release(context.Context) error
Size(ctx context.Context) (int64, error)
Metadata() *metadata.StorageItem
IdentityMapping() *idtools.IdentityMapping
}
Ref is a reference to cacheable objects.
type RefInfo ¶
type RefInfo struct {
SnapshotID string
ChainID digest.Digest
BlobChainID digest.Digest
DiffID digest.Digest
Blob digest.Digest
MediaType string
Extracted bool
}
type RefOption ¶
type RefOption interface{}
func WithCreationTime ¶
func WithDescription ¶
func WithImageRef ¶
WithImageRef appends the given imageRef to the cache ref's metadata
func WithRecordType ¶
func WithRecordType(t client.UsageRecordType) RefOption
type Unlazier ¶
Source Files ¶
blobs.go converter.go manager.go metadata.go migrate_v2.go opts.go refs.go remote.go
Directories ¶
| Path | Synopsis |
|---|---|
| cache/contenthash | |
| cache/metadata | |
| cache/remotecache | |
| cache/remotecache/inline | |
| cache/remotecache/local | |
| cache/remotecache/registry | |
| cache/remotecache/v1 | |
| cache/util |
- Version
- v0.9.0-rc1
- Published
- Jul 7, 2021
- Platform
- js/wasm
- Imports
- 45 packages
- Last checked
- 23 minutes ago –
Tools for package owners.