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 (
    LinuxAmd64   = Platform(specs.Platform{OS: "linux", Architecture: "amd64"})
    LinuxArmhf   = Platform(specs.Platform{OS: "linux", Architecture: "arm", Variant: "v7"})
    LinuxArm     = LinuxArmhf
    LinuxArmel   = Platform(specs.Platform{OS: "linux", Architecture: "arm", Variant: "v6"})
    LinuxArm64   = Platform(specs.Platform{OS: "linux", Architecture: "arm64"})
    LinuxS390x   = Platform(specs.Platform{OS: "linux", Architecture: "s390x"})
    LinuxPpc64le = Platform(specs.Platform{OS: "linux", Architecture: "ppc64le"})
    Darwin       = Platform(specs.Platform{OS: "darwin", Architecture: "amd64"})
    Windows      = Platform(specs.Platform{OS: "windows", Architecture: "amd64"})
)
var IgnoreCache = constraintsOptFunc(func(c *Constraints) {
    c.Metadata.IgnoreCache = true
})
var SecretOptional = secretOptionFunc(func(si *SecretInfo) {
    si.Optional = true
})

func MarshalConstraints Uses

func MarshalConstraints(base, override *Constraints) (*pb.Op, *pb.OpMetadata)

func Readonly Uses

func Readonly(m *mount)

func WriteTo Uses

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

type CacheMountSharingMode Uses

type CacheMountSharingMode int
const (
    CacheMountShared CacheMountSharingMode = iota
    CacheMountPrivate
    CacheMountLocked
)

type Constraints Uses

type Constraints struct {
    Platform          *specs.Platform
    WorkerConstraints []string
    Metadata          pb.OpMetadata
    LocalUniqueID     string
}

type ConstraintsOpt Uses

type ConstraintsOpt interface {
    SetConstraintsOption(*Constraints)
    RunOption
    LocalOption
    HTTPOption
    ImageOption
    GitOption
}

func LocalUniqueID Uses

func LocalUniqueID(v string) ConstraintsOpt

func Platform Uses

func Platform(p specs.Platform) ConstraintsOpt

func Require Uses

func Require(filters ...string) ConstraintsOpt

func WithDescription Uses

func WithDescription(m map[string]string) ConstraintsOpt

func WithExportCache Uses

func WithExportCache() ConstraintsOpt

WithExportCache forces results for this vertex to be exported with the cache

func WithoutDefaultExportCache Uses

func WithoutDefaultExportCache() ConstraintsOpt

WithoutDefaultExportCache resets the cache export for the vertex to use the default defined by the build configuration.

func WithoutExportCache Uses

func WithoutExportCache() ConstraintsOpt

WithoutExportCache sets results for this vertex to be not exported with the cache

type Definition Uses

type Definition struct {
    Def      [][]byte
    Metadata map[digest.Digest]pb.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
    ProxyEnv       *ProxyEnv
    Secrets        []SecretInfo
    // contains filtered or unexported fields
}

type ExecOp Uses

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

func NewExecOp Uses

func NewExecOp(root Output, meta Meta, readOnly bool, c Constraints) *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(c *Constraints) (digest.Digest, []byte, *pb.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
}

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
}

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
}

type ImageMetaResolver Uses

type ImageMetaResolver interface {
    ResolveImageConfig(ctx context.Context, ref string, platform *specs.Platform) (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
    FollowPaths     string
    SharedKeyHint   string
    // contains filtered or unexported fields
}

type LocalOption Uses

type LocalOption interface {
    SetLocalOption(*LocalInfo)
}

func ExcludePatterns Uses

func ExcludePatterns(p []string) LocalOption

func FollowPaths Uses

func FollowPaths(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 MarshalCache Uses

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

func (*MarshalCache) Cached Uses

func (mc *MarshalCache) Cached(c *Constraints) bool

func (*MarshalCache) Load Uses

func (mc *MarshalCache) Load() (digest.Digest, []byte, *pb.OpMetadata, error)

func (*MarshalCache) Store Uses

func (mc *MarshalCache) Store(dt []byte, md *pb.OpMetadata, c *Constraints)

type Meta Uses

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

type MountInfo Uses

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

type MountOption Uses

type MountOption func(*mount)

func AsPersistentCacheDir Uses

func AsPersistentCacheDir(id string, sharing CacheMountSharingMode) MountOption

func SourcePath Uses

func SourcePath(src string) MountOption

func Tmpfs Uses

func Tmpfs() MountOption

type Output Uses

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

type ProxyEnv Uses

type ProxyEnv struct {
    HttpProxy  string
    HttpsProxy string
    FtpProxy   string
    NoProxy    string
}

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 AddSecret Uses

func AddSecret(dest string, opts ...SecretOption) 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

func WithProxy Uses

func WithProxy(ps ProxyEnv) RunOption

type SecretInfo Uses

type SecretInfo struct {
    ID       string
    Target   string
    Mode     int
    UID      int
    GID      int
    Optional bool
}

type SecretOption Uses

type SecretOption interface {
    SetSecretOption(*SecretInfo)
}

func SecretFileOpt Uses

func SecretFileOpt(uid, gid, mode int) SecretOption

func SecretID Uses

func SecretID(id string) SecretOption

type SourceOp Uses

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

func NewSource Uses

func NewSource(id string, attrs map[string]string, c Constraints) *SourceOp

func (*SourceOp) Inputs Uses

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

func (*SourceOp) Marshal Uses

func (s *SourceOp) Marshal(constraints *Constraints) (digest.Digest, []byte, *pb.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 (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) GetPlatform Uses

func (s State) GetPlatform() *specs.Platform

func (State) Marshal Uses

func (s State) Marshal(co ...ConstraintsOpt) (*Definition, error)

func (State) Output Uses

func (s State) Output() Output

func (State) Platform Uses

func (s State) Platform(p specs.Platform) State

func (State) Reset Uses

func (s State) Reset(s2 State) State

func (State) Run Uses

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

func (State) SetMarhalDefaults Uses

func (s State) SetMarhalDefaults(co ...ConstraintsOpt) State

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(*Constraints) (digest.Digest, []byte, *pb.OpMetadata, error)
    Output() Output
    Inputs() []Output
}

Directories

PathSynopsis
imagemetaresolver
llbbuild

Package llb imports 21 packages (graph) and is imported by 11 packages. Updated 2018-07-20. Refresh now. Tools for package owners.