Documentation ¶
Index ¶
- Constants
- Variables
- func CachePolicyDefault(m *cacheMetadata) error
- func CachePolicyRetain(m *cacheMetadata) error
- func IsNotFound(err error) bool
- func MigrateV2(ctx context.Context, from, to string, cs content.Store, s snapshot.Snapshotter, ...) error
- type Accessor
- type Controller
- type DescHandler
- type DescHandlerKey
- type DescHandlers
- type ExternalRefChecker
- type ExternalRefCheckerFunc
- type ImmutableRef
- type Manager
- type ManagerOpt
- type MetadataStore
- type Mountable
- type MutableRef
- type NeedsRemoteProviderError
- type Ref
- type RefList
- type RefMetadata
- type RefOption
- type Unlazier
Constants ¶
View Source
const ( BaseLayer refKind = iota Layer Merge Diff )
Variables ¶
View Source
var (
ErrLocked = errors.New("locked")
)
View Source
var ErrNoBlobs = errors.Errorf("no blobs for snapshot")
View Source
var NoUpdateLastUsed noUpdateLastUsed
Functions ¶
func CachePolicyDefault ¶ added in v0.6.0
func CachePolicyDefault(m *cacheMetadata) error
func CachePolicyRetain ¶
func CachePolicyRetain(m *cacheMetadata) error
func IsNotFound ¶
Types ¶
type Accessor ¶
type Accessor interface { MetadataStore GetByBlob(ctx context.Context, desc ocispecs.Descriptor, parent ImmutableRef, opts ...RefOption) (ImmutableRef, error) Get(ctx context.Context, id string, pg progress.Controller, 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 Merge(ctx context.Context, parents []ImmutableRef, pg progress.Controller, opts ...RefOption) (ImmutableRef, error) Diff(ctx context.Context, lower, upper ImmutableRef, pg progress.Controller, opts ...RefOption) (ImmutableRef, error) }
type Controller ¶
type DescHandler ¶ added in v0.8.0
type DescHandlerKey ¶ added in v0.8.0
type DescHandlers ¶ added in v0.8.0
type DescHandlers map[digest.Digest]*DescHandler
type ExternalRefChecker ¶
type ExternalRefCheckerFunc ¶
type ExternalRefCheckerFunc func() (ExternalRefChecker, error)
type ImmutableRef ¶
type ImmutableRef interface { Ref Clone() ImmutableRef // Finalize commits the snapshot to the driver if it's not already. // This means the snapshot can no longer be mounted as mutable. Finalize(context.Context) error Extract(ctx context.Context, s session.Group) error // +progress GetRemotes(ctx context.Context, createIfNeeded bool, cfg config.RefConfig, all bool, s session.Group) ([]*solver.Remote, error) LayerChain() RefList FileList(ctx context.Context, s session.Group) ([]string, 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 ContentStore content.Store LeaseManager leases.Manager PruneRefChecker ExternalRefCheckerFunc GarbageCollect func(ctx context.Context) (gc.Stats, error) Applier diff.Applier Differ diff.Comparer MetadataStore *metadata.Store MountPoolRoot string }
type MetadataStore ¶ added in v0.10.0
type MetadataStore interface {
Search(context.Context, string) ([]RefMetadata, error)
}
type MutableRef ¶
type MutableRef interface { Ref Commit(context.Context) (ImmutableRef, error) }
type NeedsRemoteProviderError ¶ added in v0.10.0
func (NeedsRemoteProviderError) Error ¶ added in v0.10.0
func (m NeedsRemoteProviderError) Error() string
type Ref ¶
type Ref interface { Mountable RefMetadata Release(context.Context) error IdentityMapping() *idtools.IdentityMapping DescHandler(digest.Digest) *DescHandler }
Ref is a reference to cacheable objects.
type RefList ¶ added in v0.10.0
type RefList []ImmutableRef
type RefMetadata ¶ added in v0.10.0
type RefMetadata interface { ID() string GetDescription() string SetDescription(string) error GetCreatedAt() time.Time SetCreatedAt(time.Time) error HasCachePolicyDefault() bool SetCachePolicyDefault() error HasCachePolicyRetain() bool SetCachePolicyRetain() error GetLayerType() string SetLayerType(string) error GetRecordType() client.UsageRecordType SetRecordType(client.UsageRecordType) error GetEqualMutable() (RefMetadata, bool) // generic getters/setters for external packages GetString(string) string SetString(key, val, index string) error GetExternal(string) ([]byte, error) SetExternal(string, []byte) error ClearValueAndIndex(string, string) error }
type RefOption ¶
type RefOption interface{}
func WithCreationTime ¶
func WithDescription ¶
func WithImageRef ¶ added in v0.8.0
WithImageRef appends the given imageRef to the cache ref's metadata
func WithRecordType ¶
func WithRecordType(t client.UsageRecordType) RefOption
Source Files ¶
Click to show internal directories.
Click to hide internal directories.