worker
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Index¶
- func DefaultGCPolicy(p string, reservedSpace, maxUsedSpace, minFreeSpace int64) []client.PruneInfo
- type ContainerdWorker
- type LayerAccess
- type Opt
- type Worker
- func (w *Worker) BuildkitVersion() client.BuildkitVersion
- func (w *Worker) CDIManager() *cdidevices.Manager
- 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¶
typeContainerdWorker¶
ContainerdWorker is a local worker instance with dedicated snapshotter, cache, and so on.
funcNewContainerdWorker¶
func NewContainerdWorker(ctxcontext.Context, wobase.WorkerOpt, callbacksexporter.BuildkitCallbacks, rtnethttp.RoundTripper) (*ContainerdWorker,error)
NewContainerdWorker instantiates a local worker.
func (*ContainerdWorker)Exporter¶
func (w *ContainerdWorker) Exporter(namestring, sm *session.Manager) (bkexporter.Exporter,error)
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¶
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)CDIManager¶
func (w *Worker) CDIManager() *cdidevices.Manager
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)FromRemote¶
FromRemote converts a remote snapshot reference to a local one
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)LeaseManager¶
LeaseManager returns the wrapped lease manager
func (*Worker)PruneCacheMounts¶
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¶
func (w *Worker) ResolveOp(vsolver.Vertex, sfrontend.FrontendLLBBridge, sm *session.Manager) (solver.Op,error)
ResolveOp converts a LLB vertex into a LLB operation
func (*Worker)ResolveSourceMetadata¶
func (w *Worker) ResolveSourceMetadata(ctxcontext.Context, op *pb.SourceOp, optsourceresolver.Opt, sm *session.Manager, jobCtxsolver.JobContext) (*sourceresolver.MetaResponse,error)