Help us shape the future of Go! Take the 2026 Go Developer Survey

client

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildFunc

type BuildFunc func(context.Context, Client) (*Result, error)

type BuildOpts

type BuildOpts struct {
	Opts      map[string]string
	SessionID string
	Workers   []WorkerInfo
	Product   string
	LLBCaps   apicaps.CapSet
	Caps      apicaps.CapSet
}

type Client

type Client interface {
	Solve(ctx context.Context, req SolveRequest) (*Result, error)
	ResolveImageConfig(ctx context.Context, ref string, opt ResolveImageConfigOpt) (digest.Digest, []byte, error)
	BuildOpts() BuildOpts
}

type FileRange

type FileRange struct {
	Offset int
	Length int
}

type ReadDirRequest

type ReadDirRequest struct {
	Path           string
	IncludePattern string
}

type ReadRequest

type ReadRequest struct {
	Filename string
	Range    *FileRange
}

type Reference

type Reference interface {
	ReadFile(ctx context.Context, req ReadRequest) ([]byte, error)
	StatFile(ctx context.Context, req StatRequest) (*fstypes.Stat, error)
	ReadDir(ctx context.Context, req ReadDirRequest) ([]*fstypes.Stat, error)
}

type ResolveImageConfigOpt

type ResolveImageConfigOpt struct {
	Platform    *specs.Platform
	ResolveMode string
	LogName     string
}

type Result

type Result struct {
	Ref      Reference
	Refs     map[string]Reference
	Metadata map[string][]byte
	// contains filtered or unexported fields
}

func NewResult

func NewResult() *Result

func (*Result) AddMeta

func (r *Result) AddMeta(k string, v []byte)

func (*Result) AddRef

func (r *Result) AddRef(k string, ref Reference)

func (*Result) SetRef

func (r *Result) SetRef(ref Reference)

func (*Result) SingleRef

func (r *Result) SingleRef() (Reference, error)

type SolveRequest

type SolveRequest struct {
	Definition      *pb.Definition
	Frontend        string
	FrontendOpt     map[string]string
	ImportCacheRefs []string
}

SolveRequest is same as frontend.SolveRequest but avoiding dependency

type StatRequest

type StatRequest struct {
	Path string
}

type WorkerInfo

type WorkerInfo struct {
	ID        string
	Labels    map[string]string
	Platforms []specs.Platform
}

Jump to

Keyboard shortcuts

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