Documentation ¶
Index ¶
- func DefaultGCPolicy(p string, defaultKeepBytes int64) []client.PruneInfo
- type ContainerdWorker
- type LayerAccess
- type Opt
- type Worker
- func (w *Worker) BuildkitVersion() client.BuildkitVersion
- func (w *Worker) CacheManager() cache.Manager
- func (w *Worker) Close() error
- func (w *Worker) ContentStore() *containerdsnapshot.Store
- func (w *Worker) DiskUsage(ctx context.Context, opt client.DiskUsageInfo) ([]*client.UsageInfo, error)
- func (w *Worker) Executor() executor.Executor
- func (w *Worker) Exporter(name string, sm *session.Manager) (exporter.Exporter, error)
- func (w *Worker) FromRemote(ctx context.Context, remote *solver.Remote) (cache.ImmutableRef, error)
- func (w *Worker) GCPolicy() []client.PruneInfo
- func (w *Worker) GarbageCollect(ctx context.Context) error
- func (w *Worker) GetRemotes(ctx context.Context, ref cache.ImmutableRef, createIfNeeded bool, ...) ([]*solver.Remote, error)
- func (w *Worker) ID() string
- func (w *Worker) Labels() map[string]string
- func (w *Worker) LeaseManager() *leaseutil.Manager
- func (w *Worker) LoadRef(ctx context.Context, id string, hidden bool) (cache.ImmutableRef, error)
- func (w *Worker) Platforms(noCache bool) []ocispec.Platform
- func (w *Worker) Prune(ctx context.Context, ch chan client.UsageInfo, info ...client.PruneInfo) error
- func (w *Worker) PruneCacheMounts(ctx context.Context, ids map[string]bool) error
- func (w *Worker) ResolveImageConfig(ctx context.Context, ref string, opt sourceresolver.Opt, sm *session.Manager, ...) (digest.Digest, []byte, error)
- func (w *Worker) ResolveOp(v solver.Vertex, s frontend.FrontendLLBBridge, sm *session.Manager) (solver.Op, error)
- func (w *Worker) ResolveSourceMetadata(ctx context.Context, op *pb.SourceOp, opt sourceresolver.Opt, ...) (*sourceresolver.MetaResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ContainerdWorker ¶
ContainerdWorker is a local worker instance with dedicated snapshotter, cache, and so on.
func NewContainerdWorker ¶
func NewContainerdWorker(ctx context.Context, wo base.WorkerOpt, callbacks exporter.BuildkitCallbacks) (*ContainerdWorker, error)
NewContainerdWorker instantiates a local worker.
func (*ContainerdWorker) Exporter ¶
func (w *ContainerdWorker) Exporter(name string, sm *session.Manager) (bkexporter.Exporter, error)
Exporter returns exporter by name
type LayerAccess ¶
type LayerAccess interface { GetDiffIDs(ctx context.Context, key string) ([]layer.DiffID, error) EnsureLayer(ctx context.Context, key string) ([]layer.DiffID, error) }
LayerAccess provides access to a moby layer from a snapshot
type Opt ¶
type Opt struct { ID string Labels map[string]string GCPolicy []client.PruneInfo Executor executor.Executor Snapshotter snapshot.Snapshotter ContentStore *containerdsnapshot.Store CacheManager cache.Manager LeaseManager *leaseutil.Manager GarbageCollect func(context.Context) (gc.Stats, error) ImageSource *imageadapter.Source DownloadManager *xfer.LayerDownloadManager V2MetadataService distmetadata.V2MetadataService Transport nethttp.RoundTripper Exporter exporter.Exporter Layers LayerAccess Platforms []ocispec.Platform }
Opt defines a structure for creating a worker.
type Worker ¶
Worker is a local worker instance with dedicated snapshotter, cache, and so on. TODO: s/Worker/OpWorker/g ?
func (*Worker) BuildkitVersion ¶
func (w *Worker) BuildkitVersion() client.BuildkitVersion
BuildkitVersion returns BuildKit version
func (*Worker) CacheManager ¶
CacheManager returns cache.Manager for accessing local storage
func (*Worker) ContentStore ¶
func (w *Worker) ContentStore() *containerdsnapshot.Store
ContentStore returns the wrapped content store
func (*Worker) DiskUsage ¶
func (w *Worker) DiskUsage(ctx context.Context, opt client.DiskUsageInfo) ([]*client.UsageInfo, error)
DiskUsage returns disk usage report
func (*Worker) FromRemote ¶
FromRemote converts a remote snapshot reference to a local one
func (*Worker) GetRemotes ¶
func (w *Worker) GetRemotes(ctx context.Context, ref cache.ImmutableRef, createIfNeeded bool, _ cacheconfig.RefConfig, all bool, s session.Group) ([]*solver.Remote, error)
GetRemotes returns the remote snapshot references given a local reference
func (*Worker) LeaseManager ¶
LeaseManager returns the wrapped lease manager
func (*Worker) Prune ¶
func (w *Worker) Prune(ctx context.Context, ch chan client.UsageInfo, info ...client.PruneInfo) error
Prune deletes reclaimable build cache
func (*Worker) PruneCacheMounts ¶
PruneCacheMounts removes the current cache snapshots for specified IDs
func (*Worker) ResolveImageConfig ¶
func (w *Worker) ResolveImageConfig(ctx context.Context, ref string, opt sourceresolver.Opt, sm *session.Manager, g session.Group) (digest.Digest, []byte, error)
ResolveImageConfig returns image config for an image
func (*Worker) ResolveOp ¶
func (w *Worker) ResolveOp(v solver.Vertex, s frontend.FrontendLLBBridge, sm *session.Manager) (solver.Op, error)
ResolveOp converts a LLB vertex into a LLB operation
func (*Worker) ResolveSourceMetadata ¶
func (w *Worker) ResolveSourceMetadata(ctx context.Context, op *pb.SourceOp, opt sourceresolver.Opt, sm *session.Manager, g session.Group) (*sourceresolver.MetaResponse, error)