package cache
import "github.com/moby/buildkit/cache"
Index ¶
- Variables
- 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 IsLocked(err error) bool
- func IsNotFound(err error) bool
- func SetLayerType(m withMetadata, value string) error
- func SetRecordType(m withMetadata, value client.UsageRecordType) error
- type Accessor
- type Controller
- type ExternalRefChecker
- type ExternalRefCheckerFunc
- type ImmutableRef
- type Manager
- type ManagerOpt
- type Mountable
- type MutableRef
- type Ref
- type RefOption
Variables ¶
var NoUpdateLastUsed noUpdateLastUsed
Functions ¶
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 IsLocked ¶
func IsNotFound ¶
func SetLayerType ¶
func SetRecordType ¶
func SetRecordType(m withMetadata, value client.UsageRecordType) error
Types ¶
type Accessor ¶
type Accessor interface { Get(ctx context.Context, id string, opts ...RefOption) (ImmutableRef, error) GetFromSnapshotter(ctx context.Context, id string, opts ...RefOption) (ImmutableRef, error) New(ctx context.Context, s ImmutableRef, opts ...RefOption) (MutableRef, error) GetMutable(ctx context.Context, id string) (MutableRef, error) // Rebase? }
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 ExternalRefChecker ¶
type ExternalRefCheckerFunc ¶
type ExternalRefCheckerFunc func() (ExternalRefChecker, error)
type ImmutableRef ¶
type ImmutableRef interface { Ref Parent() ImmutableRef Finalize(ctx context.Context, commit bool) error // Make sure reference is flushed to driver Clone() ImmutableRef }
type Manager ¶
type Manager interface { Accessor Controller Close() error }
func NewManager ¶
func NewManager(opt ManagerOpt) (Manager, error)
type ManagerOpt ¶
type ManagerOpt struct { Snapshotter snapshot.SnapshotterBase MetadataStore *metadata.Store PruneRefChecker ExternalRefCheckerFunc }
type Mountable ¶
type MutableRef ¶
type MutableRef interface { Ref Commit(context.Context) (ImmutableRef, error) }
type Ref ¶
type Ref interface { Mountable ID() string Release(context.Context) error Size(ctx context.Context) (int64, error) Metadata() *metadata.StorageItem }
Ref is a reference to cacheable objects.
type RefOption ¶
type RefOption interface{}
func WithCreationTime ¶
func WithDescription ¶
func WithRecordType ¶
func WithRecordType(t client.UsageRecordType) RefOption
Source Files ¶
manager.go metadata.go refs.go
Directories ¶
Path | Synopsis |
---|---|
cache/blobs | |
cache/contenthash | |
cache/metadata | |
cache/remotecache | |
cache/remotecache/inline | |
cache/remotecache/local | |
cache/remotecache/registry | |
cache/remotecache/v1 | |
cache/util |
- Version
- v0.4.0
- Published
- Mar 14, 2019
- Platform
- js/wasm
- Imports
- 16 packages
- Last checked
- 12 hours ago –
Tools for package owners.