worker

package
v0.0.0-...-ab06b26 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

Controller holds worker instances. Currently, only local workers are supported.

func (*Controller) Add

func (c *Controller) Add(w Worker) error

Add adds a local worker

func (*Controller) GetAll

func (c *Controller) GetAll() []Worker

GetAll returns all local workers

func (*Controller) GetDefault

func (c *Controller) GetDefault() (Worker, error)

GetDefault returns the default local worker

type SubBuilder

type SubBuilder interface {
	SubBuild(ctx context.Context, dgst digest.Digest, req types.SolveRequest) (types.Ref, error)
}

type Worker

type Worker interface {
	InstructionCache() instructioncache.InstructionCache
	// ResolveOp resolves Vertex.Sys() to Op implementation. SubBuilder is needed for pb.Op_Build.
	ResolveOp(v types.Vertex, s SubBuilder) (types.Op, error)
	ResolveImageConfig(ctx context.Context, ref string) (digest.Digest, []byte, error)
	// Exec is similar to executor.Exec but without []mount.Mount
	Exec(ctx context.Context, meta executor.Meta, rootFS cache.ImmutableRef, stdin io.ReadCloser, stdout, stderr io.WriteCloser) error
	DiskUsage(ctx context.Context, opt client.DiskUsageInfo) ([]*client.UsageInfo, error)
	Name() string
	Exporter(name string) (exporter.Exporter, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL