-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
Description
Still WIP, but opened tentatively for adding this to 2017Q4 github project: https://github.com/moby/buildkit/projects/1
Will update the issue description next week.
// Ref is a reference to cacheable objects.
type Ref interface {
ID() string
Release(context.Context) error
Size(ctx context.Context) (int64, error)
Metadata() *metadata.StorageItem // TODO: remove
}
type ImmutableRef interface {
Ref
Finalize(ctx context.Context) error // Make sure reference is flushed to driver
// TODO: ImmutableMeta
}
type LocalImmutableRef interface {
ImmutableRef
Mountable
Extractable
Parent() LocalImmutableRef
}
// no implementation yet
// non-mountable
type RemoteImmutableRef interface {
ImmutableRef
Extractable
// copies the whole cache
Pull(ctx context.Context, something TBD) (LocalImmutableRef, error)
}
type MutableRef interface {
Ref
Mountable
// TODO: MutableMeta
Commit(context.Context) (LocalImmutableRef, error)
}
type Mountable interface {
Mount(ctx context.Context, readonly bool) ([]mount.Mount, error)
}
type Extractable interface {
// extract files within the cache.
// toPath is a local filesystem path.
// srcPaths are paths within the cache.
// used for CopyOp
Extract(ctx context.Context, toPath string, srcPath ...string) error
}Reactions are currently unavailable