pllb

package
v0.6.21 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2022 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package pllb is a wrapper around llb, which makes it compatible with concurrent code. The standard BuildKit llb package does not allow llb.State to be used from different goroutines.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddMount

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

AddMount is a wrapper around llb.AddMount.

Types

type CopyInput

type CopyInput interface {
	UnsafeUnwrap() llb.CopyInput
}

CopyInput is a mirror of llb.CopyInput.

type ExecState

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

ExecState is a wrapper around llb.ExecState.

func (ExecState) AddMount

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

AddMount is a wrapper around llb.AddMount.

func (ExecState) Root

func (e ExecState) Root() State

Root is a wrapper around llb.Root.

type FileAction

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

FileAction is a wrapper around llb.FileAction.

func Copy

func Copy(input CopyInput, src, dest string, opts ...llb.CopyOption) *FileAction

Copy is a wrapper around llb.Copy.

func Mkdir

func Mkdir(p string, m os.FileMode, opt ...llb.MkdirOption) *FileAction

Mkdir is a wrapper around llb.Mkdir.

func Mkfile

func Mkfile(p string, m os.FileMode, dt []byte, opts ...llb.MkfileOption) *FileAction

Mkfile is a wrapper around llb.Mkfile.

func (*FileAction) Copy

func (fa *FileAction) Copy(input CopyInput, src, dest string, opt ...llb.CopyOption) *FileAction

Copy is a wrapper around llb.Copy.

func (*FileAction) Mkdir

func (fa *FileAction) Mkdir(p string, m os.FileMode, opt ...llb.MkdirOption) *FileAction

Mkdir is a wrapper around llb.Mkdir.

func (*FileAction) Mkfile

func (fa *FileAction) Mkfile(p string, m os.FileMode, dt []byte, opt ...llb.MkfileOption) *FileAction

Mkfile is a wrapper around llb.Mkfile.

func (*FileAction) Rm

func (fa *FileAction) Rm(p string, opt ...llb.RmOption) *FileAction

Rm is a wrapper around llb.Rm.

type State

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

State is a wrapper around llb.State.

func FromRawState

func FromRawState(st llb.State) State

FromRawState creates a wrapper around a raw llb.State.

func Git

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

Git is a wrapper around llb.Git.

func Image

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

Image is a wrapper around llb.Image.

func Local

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

Local is a wrapper around llb.Local.

func Merge

func Merge(sts []State, opts ...llb.ConstraintsOpt) State

Merge is a wrapper around llb.Merge.

func Scratch

func Scratch() State

Scratch is a wrapper around llb.Scratch.

func (State) AddEnv

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

AddEnv is a wrapper around llb.AddEnv.

func (State) AddExtraHost

func (s State) AddExtraHost(hostname string, ip net.IP) State

AddExtraHost is a wrapper around llb.AddExtraHost

func (State) Dir

func (s State) Dir(str string) State

Dir is a wrapper around llb.Dir.

func (State) File

func (s State) File(a *FileAction, opts ...llb.ConstraintsOpt) State

File is a wrapper around llb.File.

func (State) GetDir

func (s State) GetDir(ctx context.Context) (string, error)

GetDir is a wrapper around llb.GetDir.

func (State) Marshal

func (s State) Marshal(ctx context.Context, co ...llb.ConstraintsOpt) (*llb.Definition, error)

Marshal is a wrapper around llb.Marshal.

func (State) Output

func (s State) Output() llb.Output

Output is a wrapper around llb.Output.

func (State) Platform

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

Platform is a wrapper around llb.Platform.

func (State) RawState

func (s State) RawState() (llb.State, func())

RawState returns the wrapped llb.State, but requires an unlock from the caller.

func (State) Run

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

Run is a wrapper around llb.Run.

func (State) SetMarshalDefaults

func (s State) SetMarshalDefaults(co ...llb.ConstraintsOpt) State

SetMarshalDefaults is a wrapper around llb.SetMarshalDefaults.

func (State) UnsafeUnwrap

func (s State) UnsafeUnwrap() llb.CopyInput

UnsafeUnwrap returns the underlying llb.State without locking.

func (State) User

func (s State) User(v string) State

User is a wrapper around llb.User.

Jump to

Keyboard shortcuts

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