docker: Index | Files

package worker

import ""


Package Files

gc.go gc_unix.go worker.go

func DefaultGCPolicy Uses

func DefaultGCPolicy(p string, defaultKeepBytes int64) []client.PruneInfo

DefaultGCPolicy returns a default builder GC policy

type LayerAccess Uses

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 Uses

type Opt struct {
    ID                string
    Labels            map[string]string
    GCPolicy          []client.PruneInfo
    MetadataStore     *metadata.Store
    Executor          executor.Executor
    Snapshotter       snapshot.Snapshotter
    ContentStore      content.Store
    CacheManager      cache.Manager
    ImageSource       *containerimage.Source
    DownloadManager   distribution.RootFSDownloadManager
    V2MetadataService distmetadata.V2MetadataService
    Transport         nethttp.RoundTripper
    Exporter          exporter.Exporter
    Layers            LayerAccess
    Platforms         []ocispec.Platform

Opt defines a structure for creating a worker.

type Worker Uses

type Worker struct {
    SourceManager *source.Manager

Worker is a local worker instance with dedicated snapshotter, cache, and so on. TODO: s/Worker/OpWorker/g ?

func NewWorker Uses

func NewWorker(opt Opt) (*Worker, error)

NewWorker instantiates a local worker

func (*Worker) CacheManager Uses

func (w *Worker) CacheManager() cache.Manager

CacheManager returns cache.Manager for accessing local storage

func (*Worker) ContentStore Uses

func (w *Worker) ContentStore() content.Store

ContentStore returns content store

func (*Worker) DiskUsage Uses

func (w *Worker) DiskUsage(ctx context.Context, opt client.DiskUsageInfo) ([]*client.UsageInfo, error)

DiskUsage returns disk usage report

func (*Worker) Executor Uses

func (w *Worker) Executor() executor.Executor

Executor returns executor.Executor for running processes

func (*Worker) Exporter Uses

func (w *Worker) Exporter(name string, sm *session.Manager) (exporter.Exporter, error)

Exporter returns exporter by name

func (*Worker) FromRemote Uses

func (w *Worker) FromRemote(ctx context.Context, remote *solver.Remote) (cache.ImmutableRef, error)

FromRemote converts a remote snapshot reference to a local one

func (*Worker) GCPolicy Uses

func (w *Worker) GCPolicy() []client.PruneInfo

GCPolicy returns automatic GC Policy

func (*Worker) GetRemote Uses

func (w *Worker) GetRemote(ctx context.Context, ref cache.ImmutableRef, createIfNeeded bool, _ compression.Type, _ session.Group) (*solver.Remote, error)

GetRemote returns a remote snapshot reference for a local one

func (*Worker) ID Uses

func (w *Worker) ID() string

ID returns worker ID

func (*Worker) Labels Uses

func (w *Worker) Labels() map[string]string

Labels returns map of all worker labels

func (*Worker) LoadRef Uses

func (w *Worker) LoadRef(ctx context.Context, id string, hidden bool) (cache.ImmutableRef, error)

LoadRef loads a reference by ID

func (*Worker) MetadataStore Uses

func (w *Worker) MetadataStore() *metadata.Store

MetadataStore returns the metadata store

func (*Worker) Platforms Uses

func (w *Worker) Platforms(noCache bool) []ocispec.Platform

Platforms returns one or more platforms supported by the image.

func (*Worker) Prune Uses

func (w *Worker) Prune(ctx context.Context, ch chan client.UsageInfo, info ...client.PruneInfo) error

Prune deletes reclaimable build cache

func (*Worker) PruneCacheMounts Uses

func (w *Worker) PruneCacheMounts(ctx context.Context, ids []string) error

PruneCacheMounts removes the current cache snapshots for specified IDs

func (*Worker) ResolveImageConfig Uses

func (w *Worker) ResolveImageConfig(ctx context.Context, ref string, opt llb.ResolveImageConfigOpt, sm *session.Manager, g session.Group) (digest.Digest, []byte, error)

ResolveImageConfig returns image config for an image

func (*Worker) ResolveOp Uses

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

Package worker imports 49 packages (graph) and is imported by 2 packages. Updated 2020-12-10. Refresh now. Tools for package owners.