Movatterモバイル変換


[0]ホーム

URL:


worker

package
v2.0.0-beta.5Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2025 License:Apache-2.0Imports:53Imported by:0

Details

Repository

github.com/moby/moby

Links

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

funcDefaultGCPolicy

func DefaultGCPolicy(pstring, reservedSpace, maxUsedSpace, minFreeSpaceint64) []client.PruneInfo

DefaultGCPolicy returns a default builder GC policy

Types

typeContainerdWorker

type ContainerdWorker struct {*base.Worker// contains filtered or unexported fields}

ContainerdWorker is a local worker instance with dedicated snapshotter, cache, and so on.

funcNewContainerdWorker

NewContainerdWorker instantiates a local worker.

func (*ContainerdWorker)Exporter

Exporter returns exporter by name

typeLayerAccess

type LayerAccess interface {GetDiffIDs(ctxcontext.Context, keystring) ([]layer.DiffID,error)EnsureLayer(ctxcontext.Context, keystring) ([]layer.DiffID,error)}

LayerAccess provides access to a moby layer from a snapshot

typeOpt

type Opt struct {IDstringLabels         map[string]stringGCPolicy       []client.PruneInfoExecutorexecutor.ExecutorSnapshottersnapshot.SnapshotterContentStore   *containerdsnapshot.StoreCacheManagercache.ManagerLeaseManager   *leaseutil.ManagerGarbageCollect func(context.Context) (gc.Stats,error)ImageSource    *imageadapter.SourceDownloadManager   *xfer.LayerDownloadManagerV2MetadataServicedistmetadata.V2MetadataServiceTransportnethttp.RoundTripperExporterexporter.ExporterLayersLayerAccessPlatforms         []ocispec.PlatformCDIManager        *cdidevices.Manager}

Opt defines a structure for creating a worker.

typeWorker

type Worker struct {OptSourceManager *source.ManagerGitSource     *git.SourceHTTPSource    *http.Source}

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

funcNewWorker

func NewWorker(optOpt) (*Worker,error)

NewWorker instantiates a local worker

func (*Worker)BuildkitVersion

func (w *Worker) BuildkitVersion()client.BuildkitVersion

BuildkitVersion returns BuildKit version

func (*Worker)CDIManager

func (w *Worker) CDIManager() *cdidevices.Manager

func (*Worker)CacheManager

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

CacheManager returns cache.Manager for accessing local storage

func (*Worker)Close

func (w *Worker) Close()error

Close closes the worker and releases all resources

func (*Worker)ContentStore

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

ContentStore returns the wrapped content store

func (*Worker)DiskUsage

func (w *Worker) DiskUsage(ctxcontext.Context, optclient.DiskUsageInfo) ([]*client.UsageInfo,error)

DiskUsage returns disk usage report

func (*Worker)Executor

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

Executor returns executor.Executor for running processes

func (*Worker)Exporter

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

Exporter returns exporter by name

func (*Worker)FromRemote

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

FromRemote converts a remote snapshot reference to a local one

func (*Worker)GCPolicy

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

GCPolicy returns automatic GC Policy

func (*Worker)GarbageCollect

func (w *Worker) GarbageCollect(ctxcontext.Context)error

func (*Worker)GetRemotes

func (w *Worker) GetRemotes(ctxcontext.Context, refcache.ImmutableRef, createIfNeededbool, _cacheconfig.RefConfig, allbool, ssession.Group) ([]*solver.Remote,error)

GetRemotes returns the remote snapshot references given a local reference

func (*Worker)ID

func (w *Worker) ID()string

ID returns worker ID

func (*Worker)Labels

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

Labels returns map of all worker labels

func (*Worker)LeaseManager

func (w *Worker) LeaseManager() *leaseutil.Manager

LeaseManager returns the wrapped lease manager

func (*Worker)LoadRef

func (w *Worker) LoadRef(ctxcontext.Context, idstring, hiddenbool) (cache.ImmutableRef,error)

LoadRef loads a reference by ID

func (*Worker)Platforms

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

Platforms returns one or more platforms supported by the image.

func (*Worker)Prune

func (w *Worker) Prune(ctxcontext.Context, ch chanclient.UsageInfo, info ...client.PruneInfo)error

Prune deletes reclaimable build cache

func (*Worker)PruneCacheMounts

func (w *Worker) PruneCacheMounts(ctxcontext.Context, ids map[string]bool)error

PruneCacheMounts removes the current cache snapshots for specified IDs

func (*Worker)ResolveImageConfig

func (w *Worker) ResolveImageConfig(ctxcontext.Context, refstring, optsourceresolver.Opt, sm *session.Manager, jobCtxsolver.JobContext) (digest.Digest, []byte,error)

ResolveImageConfig returns image config for an image

func (*Worker)ResolveOp

ResolveOp converts a LLB vertex into a LLB operation

Source Files

View all Source files

Directories

PathSynopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp