buildkit: github.com/moby/buildkit/client/llb Index | Files | Directories

package llb

import "github.com/moby/buildkit/client/llb"

Index

Package Files

exec.go marshal.go meta.go resolver.go source.go state.go

Variables

var IgnoreCache = metadataOptFunc(func(md *OpMetadata) {
    md.IgnoreCache = true
})

func Readonly Uses

func Readonly(m *mount)

func WriteTo Uses

func WriteTo(def *Definition, w io.Writer) error

type Definition Uses

type Definition struct {
    Def      [][]byte
    Metadata map[digest.Digest]OpMetadata
}

Definition is the LLB definition structure with per-vertex metadata entries Corresponds to the Definition structure defined in solver/pb.Definition.

func ReadFrom Uses

func ReadFrom(r io.Reader) (*Definition, error)

func (*Definition) FromPB Uses

func (def *Definition) FromPB(x *pb.Definition)

func (*Definition) ToPB Uses

func (def *Definition) ToPB() *pb.Definition

type EnvList Uses

type EnvList []KeyValue

func (EnvList) AddOrReplace Uses

func (e EnvList) AddOrReplace(k, v string) EnvList

func (EnvList) Delete Uses

func (e EnvList) Delete(k string) EnvList

func (EnvList) Get Uses

func (e EnvList) Get(k string) (string, bool)

func (EnvList) Index Uses

func (e EnvList) Index(k string) (int, bool)

func (EnvList) ToArray Uses

func (e EnvList) ToArray() []string

type ExecInfo Uses

type ExecInfo struct {
    State          State
    Mounts         []MountInfo
    ReadonlyRootFS bool
    // contains filtered or unexported fields
}

func (*ExecInfo) ApplyMetadata Uses

func (mw *ExecInfo) ApplyMetadata(f func(m *OpMetadata))

func (*ExecInfo) Metadata Uses

func (mw *ExecInfo) Metadata() OpMetadata

type ExecOp Uses

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

func NewExecOp Uses

func NewExecOp(root Output, meta Meta, readOnly bool, md OpMetadata) *ExecOp

func (*ExecOp) AddMount Uses

func (e *ExecOp) AddMount(target string, source Output, opt ...MountOption) Output

func (*ExecOp) GetMount Uses

func (e *ExecOp) GetMount(target string) Output

func (*ExecOp) Inputs Uses

func (e *ExecOp) Inputs() (inputs []Output)

func (*ExecOp) Marshal Uses

func (e *ExecOp) Marshal() (digest.Digest, []byte, *OpMetadata, error)

func (*ExecOp) Output Uses

func (e *ExecOp) Output() Output

func (*ExecOp) Validate Uses

func (e *ExecOp) Validate() error

type ExecState Uses

type ExecState struct {
    State
    // contains filtered or unexported fields
}

func (ExecState) AddMount Uses

func (e ExecState) AddMount(target string, source State, opt ...MountOption) State

func (ExecState) GetMount Uses

func (e ExecState) GetMount(target string) State

func (ExecState) Root Uses

func (e ExecState) Root() State

type GitInfo Uses

type GitInfo struct {
    KeepGitDir bool
    // contains filtered or unexported fields
}

func (*GitInfo) ApplyMetadata Uses

func (mw *GitInfo) ApplyMetadata(f func(m *OpMetadata))

func (*GitInfo) Metadata Uses

func (mw *GitInfo) Metadata() OpMetadata

type GitOption Uses

type GitOption interface {
    SetGitOption(*GitInfo)
}

func KeepGitDir Uses

func KeepGitDir() GitOption

type HTTPInfo Uses

type HTTPInfo struct {
    Checksum digest.Digest
    Filename string
    Perm     int
    UID      int
    GID      int
    // contains filtered or unexported fields
}

func (*HTTPInfo) ApplyMetadata Uses

func (mw *HTTPInfo) ApplyMetadata(f func(m *OpMetadata))

func (*HTTPInfo) Metadata Uses

func (mw *HTTPInfo) Metadata() OpMetadata

type HTTPOption Uses

type HTTPOption interface {
    SetHTTPOption(*HTTPInfo)
}

func Checksum Uses

func Checksum(dgst digest.Digest) HTTPOption

func Chmod Uses

func Chmod(perm os.FileMode) HTTPOption

func Chown Uses

func Chown(uid, gid int) HTTPOption

func Filename Uses

func Filename(name string) HTTPOption

type ImageInfo Uses

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

func (*ImageInfo) ApplyMetadata Uses

func (mw *ImageInfo) ApplyMetadata(f func(m *OpMetadata))

func (*ImageInfo) Metadata Uses

func (mw *ImageInfo) Metadata() OpMetadata

type ImageMetaResolver Uses

type ImageMetaResolver interface {
    ResolveImageConfig(ctx context.Context, ref string) (digest.Digest, []byte, error)
}

type ImageOption Uses

type ImageOption interface {
    SetImageOption(*ImageInfo)
}

func WithMetaResolver Uses

func WithMetaResolver(mr ImageMetaResolver) ImageOption

type ImageOptionFunc Uses

type ImageOptionFunc func(*ImageInfo)

func (ImageOptionFunc) SetImageOption Uses

func (fn ImageOptionFunc) SetImageOption(ii *ImageInfo)

type KeyValue Uses

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

type LocalInfo Uses

type LocalInfo struct {
    SessionID       string
    IncludePatterns string
    ExcludePatterns string
    SharedKeyHint   string
    // contains filtered or unexported fields
}

func (*LocalInfo) ApplyMetadata Uses

func (mw *LocalInfo) ApplyMetadata(f func(m *OpMetadata))

func (*LocalInfo) Metadata Uses

func (mw *LocalInfo) Metadata() OpMetadata

type LocalOption Uses

type LocalOption interface {
    SetLocalOption(*LocalInfo)
}

func ExcludePatterns Uses

func ExcludePatterns(p []string) LocalOption

func IncludePatterns Uses

func IncludePatterns(p []string) LocalOption

func SessionID Uses

func SessionID(id string) LocalOption

func SharedKeyHint Uses

func SharedKeyHint(h string) LocalOption

type Meta Uses

type Meta struct {
    Args []string
    Env  EnvList
    Cwd  string
    User string
}

type MetadataOpt Uses

type MetadataOpt interface {
    SetMetadataOption(*OpMetadata)
    RunOption
    LocalOption
    HTTPOption
    ImageOption
    GitOption
}

func WithDescription Uses

func WithDescription(m map[string]string) MetadataOpt

type MountInfo Uses

type MountInfo struct {
    Target string
    Source Output
    Opts   []MountOption
}

type MountOption Uses

type MountOption func(*mount)

func SourcePath Uses

func SourcePath(src string) MountOption

type OpMetadata Uses

type OpMetadata = pb.OpMetadata

type Output Uses

type Output interface {
    ToInput() (*pb.Input, error)
    Vertex() Vertex
}

type RunOption Uses

type RunOption interface {
    SetRunOption(es *ExecInfo)
}

func AddEnv Uses

func AddEnv(key, value string) RunOption

func AddEnvf Uses

func AddEnvf(key, value string, v ...interface{}) RunOption

func AddMount Uses

func AddMount(dest string, mountState State, opts ...MountOption) RunOption

func Args Uses

func Args(a []string) RunOption

func Dir Uses

func Dir(str string) RunOption

func Dirf Uses

func Dirf(str string, v ...interface{}) RunOption

func ReadonlyRootFS Uses

func ReadonlyRootFS() RunOption

func Reset Uses

func Reset(s State) RunOption

func Shlex Uses

func Shlex(str string) RunOption

func Shlexf Uses

func Shlexf(str string, v ...interface{}) RunOption

func User Uses

func User(str string) RunOption

func With Uses

func With(so ...StateOption) RunOption

type SourceOp Uses

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

func NewSource Uses

func NewSource(id string, attrs map[string]string, md OpMetadata) *SourceOp

func (*SourceOp) Inputs Uses

func (s *SourceOp) Inputs() []Output

func (*SourceOp) Marshal Uses

func (s *SourceOp) Marshal() (digest.Digest, []byte, *OpMetadata, error)

func (*SourceOp) Output Uses

func (s *SourceOp) Output() Output

func (*SourceOp) Validate Uses

func (s *SourceOp) Validate() error

type State Uses

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

func Git Uses

func Git(remote, ref string, opts ...GitOption) State

func HTTP Uses

func HTTP(url string, opts ...HTTPOption) State

func Image Uses

func Image(ref string, opts ...ImageOption) State

func Local Uses

func Local(name string, opts ...LocalOption) State

func NewState Uses

func NewState(o Output) State

func Scratch Uses

func Scratch() State

func Source Uses

func Source(id string) State

func (State) AddEnv Uses

func (s State) AddEnv(key, value string) State

func (State) AddEnvf Uses

func (s State) AddEnvf(key, value string, v ...interface{}) State

func (State) Dir Uses

func (s State) Dir(str string) State

func (State) Dirf Uses

func (s State) Dirf(str string, v ...interface{}) State

func (State) GetArgs Uses

func (s State) GetArgs() []string

func (State) GetDir Uses

func (s State) GetDir() string

func (State) GetEnv Uses

func (s State) GetEnv(key string) (string, bool)

func (State) Marshal Uses

func (s State) Marshal(md ...MetadataOpt) (*Definition, error)

func (State) Output Uses

func (s State) Output() Output

func (State) Reset Uses

func (s State) Reset(s2 State) State

func (State) Run Uses

func (s State) Run(ro ...RunOption) ExecState

func (State) User Uses

func (s State) User(v string) State

func (State) Validate Uses

func (s State) Validate() error

func (State) Value Uses

func (s State) Value(k interface{}) interface{}

func (State) With Uses

func (s State) With(so ...StateOption) State

func (State) WithOutput Uses

func (s State) WithOutput(o Output) State

func (State) WithValue Uses

func (s State) WithValue(k, v interface{}) State

type StateOption Uses

type StateOption func(State) State

type Vertex Uses

type Vertex interface {
    Validate() error
    Marshal() (digest.Digest, []byte, *OpMetadata, error)
    Output() Output
    Inputs() []Output
}

Directories

PathSynopsis
imagemetaresolver
llbbuild

Package llb imports 16 packages (graph) and is imported by 11 packages. Updated 2018-03-23. Refresh now. Tools for package owners.