client

package
v0.0.0-...-44b843d Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2018 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExporterImage  = "image"
	ExporterLocal  = "local"
	ExporterOCI    = "oci"
	ExporterDocker = "docker"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(address string, opts ...ClientOpt) (*Client, error)

New returns a new buildkit client. Address can be empty for the system-default address.

func (*Client) Close

func (c *Client) Close() error

func (*Client) DiskUsage

func (c *Client) DiskUsage(ctx context.Context, opts ...DiskUsageOption) ([]*UsageInfo, error)

func (*Client) ListWorkers

func (c *Client) ListWorkers(ctx context.Context, opts ...ListWorkersOption) ([]*WorkerInfo, error)

func (*Client) Prune

func (c *Client) Prune(ctx context.Context, ch chan UsageInfo, opts ...PruneOption) error

func (*Client) Solve

func (c *Client) Solve(ctx context.Context, def *llb.Definition, opt SolveOpt, statusChan chan *SolveStatus) error

Solve calls Solve on the controller. def must be nil if (and only if) opt.Frontend is set.

type ClientOpt

type ClientOpt interface{}

func WithBlock

func WithBlock() ClientOpt

func WithCredentials

func WithCredentials(serverName, ca, cert, key string) ClientOpt

WithCredentials configures the TLS parameters of the client. Arguments: * serverName: specifies the name of the target server * ca: specifies the filepath of the CA certificate to use for verification * cert: specifies the filepath of the client certificate * key: specifies the filepath of the client key

func WithTracer

func WithTracer(t opentracing.Tracer) ClientOpt

type DiskUsageInfo

type DiskUsageInfo struct {
	Filter string
}

type DiskUsageOption

type DiskUsageOption func(*DiskUsageInfo)

func WithFilter

func WithFilter(f string) DiskUsageOption

type ListWorkersInfo

type ListWorkersInfo struct {
	Filter []string
}

type ListWorkersOption

type ListWorkersOption func(*ListWorkersInfo)

func WithWorkerFilter

func WithWorkerFilter(f []string) ListWorkersOption

type PruneInfo

type PruneInfo struct {
}

type PruneOption

type PruneOption func(*PruneInfo)

type SolveOpt

type SolveOpt struct {
	Exporter          string
	ExporterAttrs     map[string]string
	ExporterOutput    io.WriteCloser // for ExporterOCI and ExporterDocker
	ExporterOutputDir string         // for ExporterLocal
	LocalDirs         map[string]string
	SharedKey         string
	Frontend          string
	FrontendAttrs     map[string]string
	ExportCache       string
	ImportCache       string
}

type SolveStatus

type SolveStatus struct {
	Vertexes []*Vertex
	Statuses []*VertexStatus
	Logs     []*VertexLog
}

type UsageInfo

type UsageInfo struct {
	ID      string
	Mutable bool
	InUse   bool
	Size    int64

	CreatedAt   time.Time
	LastUsedAt  *time.Time
	UsageCount  int
	Parent      string
	Description string
}

type Vertex

type Vertex struct {
	Digest    digest.Digest
	Inputs    []digest.Digest
	Name      string
	Started   *time.Time
	Completed *time.Time
	Cached    bool
	Error     string
}

type VertexLog

type VertexLog struct {
	Vertex    digest.Digest
	Stream    int
	Data      []byte
	Timestamp time.Time
}

type VertexStatus

type VertexStatus struct {
	ID        string
	Vertex    digest.Digest
	Name      string
	Total     int64
	Current   int64
	Timestamp time.Time
	Started   *time.Time
	Completed *time.Time
}

type WorkerInfo

type WorkerInfo struct {
	ID     string
	Labels map[string]string
}

Directories

Path Synopsis
llb

Jump to

Keyboard shortcuts

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