buildkit: Index | Files | Directories

package llb

import ""


Package Files

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


const (
    NetModeSandbox = pb.NetMode_UNSET
    NetModeHost    = pb.NetMode_HOST
    NetModeNone    = pb.NetMode_NONE


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 MarkImageInternal = imageOptionFunc(func(ii *ImageInfo) {
    ii.RecordType = "internal"
var SSHOptional = sshOptionFunc(func(si *SSHInfo) {
    si.Optional = 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

type Constraints Uses

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

type ConstraintsOpt Uses

type ConstraintsOpt interface {

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

func WithCaps(caps apicaps.CapSet) ConstraintsOpt

WithCaps exposes supported LLB caps to the marshaler

func WithCustomName Uses

func WithCustomName(name string, a ...interface{}) 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) SetDefault Uses

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

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
    SSH            []SSHInfo
    // contains filtered or unexported fields

type ExecOp Uses

type ExecOp struct {
    // 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 {
    // 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 {

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 {

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

type HostIP struct {
    Host string
    IP   net.IP

type ImageInfo Uses

type ImageInfo struct {
    RecordType string
    // contains filtered or unexported fields

type ImageMetaResolver Uses

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

ImageMetaResolver can resolve image config metadata from a reference

type ImageOption Uses

type ImageOption interface {

func WithMetaResolver Uses

func WithMetaResolver(mr ImageMetaResolver) ImageOption

WithMetaResolver adds a metadata resolver to an image

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 {

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
    ExtraHosts []HostIP
    Network    pb.NetMode

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

type ResolveMode int
const (
    ResolveModeDefault ResolveMode = iota

func (ResolveMode) SetImageOption Uses

func (r ResolveMode) SetImageOption(ii *ImageInfo)

func (ResolveMode) String Uses

func (r ResolveMode) String() 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 AddExtraHost Uses

func AddExtraHost(host string, ip net.IP) RunOption

func AddMount Uses

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

func AddSSHSocket Uses

func AddSSHSocket(opts ...SSHOption) 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 Network Uses

func Network(n pb.NetMode) 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 SSHInfo Uses

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

type SSHOption Uses

type SSHOption interface {

func SSHID Uses

func SSHID(id string) SSHOption

func SSHSocketOpt Uses

func SSHSocketOpt(target string, uid, gid, mode int) SSHOption

func SSHSocketTarget Uses

func SSHSocketTarget(target string) SSHOption

type SecretInfo Uses

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

type SecretOption Uses

type SecretOption interface {

func SecretFileOpt Uses

func SecretFileOpt(uid, gid, mode int) SecretOption

func SecretID Uses

func SecretID(id string) SecretOption

type SourceOp Uses

type SourceOp struct {
    // 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) AddExtraHost Uses

func (s State) AddExtraHost(host string, ip net.IP) 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) Env Uses

func (s State) Env() []string

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) GetNetwork Uses

func (s State) GetNetwork() pb.NetMode

func (State) GetPlatform Uses

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

func (State) Marshal Uses

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

func (State) Network Uses

func (s State) Network(n pb.NetMode) State

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) SetMarshalDefaults Uses

func (s State) SetMarshalDefaults(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) WithImageConfig Uses

func (s State) WithImageConfig(c []byte) (State, error)

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



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