package client
import "github.com/moby/buildkit/client"
Index ¶
- Constants
- Variables
- type Client
- func New(ctx context.Context, address string, opts ...ClientOpt) (*Client, error)
- func (c *Client) Build(ctx context.Context, opt SolveOpt, product string, buildFunc gateway.BuildFunc, statusChan chan *SolveStatus) (*SolveResponse, error)
- func (c *Client) Close() error
- func (c *Client) DiskUsage(ctx context.Context, opts ...DiskUsageOption) ([]*UsageInfo, error)
- func (c *Client) ListWorkers(ctx context.Context, opts ...ListWorkersOption) ([]*WorkerInfo, error)
- func (c *Client) Prune(ctx context.Context, ch chan UsageInfo, opts ...PruneOption) error
- func (c *Client) Solve(ctx context.Context, def *llb.Definition, opt SolveOpt, statusChan chan *SolveStatus) (*SolveResponse, error)
- type ClientOpt
- func WithCredentials(serverName, ca, cert, key string) ClientOpt
- func WithFailFast() ClientOpt
- func WithTracer(t opentracing.Tracer) ClientOpt
- type DiskUsageInfo
- type DiskUsageOption
- type Filter
- func WithFilter(f []string) Filter
- func (f Filter) SetDiskUsageOption(di *DiskUsageInfo)
- func (f Filter) SetListWorkersOption(lwi *ListWorkersInfo)
- func (f Filter) SetPruneOption(pi *PruneInfo)
- type ListWorkersInfo
- type ListWorkersOption
- type PruneInfo
- type PruneOption
- type SolveOpt
- type SolveResponse
- type SolveStatus
- type UsageInfo
- type UsageRecordType
- type Vertex
- type VertexLog
- type VertexStatus
- type WorkerInfo
Constants ¶
const ( ExporterImage = "image" ExporterLocal = "local" ExporterOCI = "oci" ExporterDocker = "docker" )
Variables ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func New ¶
New returns a new buildkit client. Address can be empty for the system-default address.
func (*Client) Build ¶
func (c *Client) Build(ctx context.Context, opt SolveOpt, product string, buildFunc gateway.BuildFunc, statusChan chan *SolveStatus) (*SolveResponse, error)
func (*Client) Close ¶
func (*Client) DiskUsage ¶
func (*Client) ListWorkers ¶
func (c *Client) ListWorkers(ctx context.Context, opts ...ListWorkersOption) ([]*WorkerInfo, error)
ListWorkers lists all active workers
func (*Client) Prune ¶
func (*Client) Solve ¶
func (c *Client) Solve(ctx context.Context, def *llb.Definition, opt SolveOpt, statusChan chan *SolveStatus) (*SolveResponse, 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 WithCredentials ¶
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 WithFailFast ¶
func WithFailFast() ClientOpt
func WithTracer ¶
func WithTracer(t opentracing.Tracer) ClientOpt
type DiskUsageInfo ¶
type DiskUsageInfo struct { Filter []string }
type DiskUsageOption ¶
type DiskUsageOption interface { SetDiskUsageOption(*DiskUsageInfo) }
type Filter ¶
type Filter []string
func WithFilter ¶
func (Filter) SetDiskUsageOption ¶
func (f Filter) SetDiskUsageOption(di *DiskUsageInfo)
func (Filter) SetListWorkersOption ¶
func (f Filter) SetListWorkersOption(lwi *ListWorkersInfo)
func (Filter) SetPruneOption ¶
type ListWorkersInfo ¶
type ListWorkersInfo struct { Filter []string }
ListWorkersInfo is a payload for worker list query
type ListWorkersOption ¶
type ListWorkersOption interface { SetListWorkersOption(*ListWorkersInfo) }
ListWorkersOption is an option for a worker list query
type PruneInfo ¶
type PruneOption ¶
type PruneOption interface { SetPruneOption(*PruneInfo) }
func WithKeepOpt ¶
func WithKeepOpt(duration time.Duration, bytes int64) PruneOption
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 string Frontend string FrontendAttrs map[string]string ExportCache string ExportCacheAttrs map[string]string ImportCache []string Session []session.Attachable AllowedEntitlements []entitlements.Entitlement }
type SolveResponse ¶
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 RecordType UsageRecordType bool }
type UsageRecordType ¶
type UsageRecordType string
const ( UsageRecordTypeInternal UsageRecordType = "internal" UsageRecordTypeFrontend UsageRecordType = "frontend" UsageRecordTypeLocalSource UsageRecordType = "source.local" UsageRecordTypeGitCheckout UsageRecordType = "source.git.checkout" UsageRecordTypeCacheMount UsageRecordType = "exec.cachemount" UsageRecordTypeRegular UsageRecordType = "regular" )
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 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 Platforms []specs.Platform GCPolicy []PruneInfo }
WorkerInfo contains information about a worker
Source Files ¶
build.go client.go client_unix.go diskusage.go exporters.go filter.go graph.go prune.go solve.go workers.go
Directories ¶
Path | Synopsis |
---|---|
client/buildid | |
client/llb | |
client/llb/imagemetaresolver | |
client/llb/llbbuild | |
client/llb/llbtest |
- Version
- v0.3.3
- Published
- Nov 21, 2018
- Platform
- js/wasm
- Imports
- 36 packages
- Last checked
- 10 minutes ago –
Tools for package owners.