buildkit

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2022 License: Apache-2.0 Imports: 46 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrExit   = errors.New("exit")
	ErrReload = errors.New("reload")
)

Functions

func Debug

func Debug(ctx context.Context, cfg *config.Config, solveOpt *client.SolveOpt, progressWriter io.Writer, debugConfig DebugConfig) error

func Du

func Du(ctx context.Context, cfg *config.Config, w io.Writer) error

func ExecContainer

func ExecContainer(ctx context.Context, cfg ContainerConfig) (_ gwclient.ContainerProcess, _ func(), retErr error)

func Prune

func Prune(ctx context.Context, cfg *config.Config, all bool, w io.Writer) error

Types

type BreakContext

type BreakContext struct {
	Handler *Handler
	Info    *RegisteredStatus
	Locs    []*Location
	Hits    map[string]BreakpointInfo
}

type Breakpoint

type Breakpoint interface {
	IsMarked(source *pb.SourceInfo, line int64) bool
	String() string
	// contains filtered or unexported methods
}

func NewLineBreakpoint

func NewLineBreakpoint(filename string, line int64) Breakpoint

func NewOnFailBreakpoint

func NewOnFailBreakpoint() Breakpoint

type BreakpointHandler

type BreakpointHandler func(ctx context.Context, bCtx BreakContext) error

type BreakpointInfo

type BreakpointInfo struct {
	Description string
	Hits        []*Location
}

type Breakpoints

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

func NewBreakpoints

func NewBreakpoints() *Breakpoints

func (*Breakpoints) Add

func (b *Breakpoints) Add(key string, bp Breakpoint) (string, error)

func (*Breakpoints) Clear

func (b *Breakpoints) Clear(key string)

func (*Breakpoints) ClearAll

func (b *Breakpoints) ClearAll()

func (*Breakpoints) ForEach

func (b *Breakpoints) ForEach(f func(key string, bp Breakpoint) bool)

func (*Breakpoints) Get

func (b *Breakpoints) Get(key string) (Breakpoint, bool)

type ContainerConfig

type ContainerConfig struct {
	GatewayClient  gwclient.Client
	Info           *RegisteredStatus
	Args           []string
	Tty            bool
	Stdin          io.ReadCloser
	Stdout, Stderr io.WriteCloser
	Image          gwclient.Reference
	Mountroot      string
	InputMount     bool
	Env            []string
	Cwd            string
	WatchSignal    func(ctx context.Context, proc gwclient.ContainerProcess, con console.Console)
	NoSetRaw       bool // TODO: FIXME: execContainer should be agnostic about console config
}

type DebugConfig

type DebugConfig struct {
	BreakpointHandler  BreakpointHandler
	DebugImage         string
	Breakpoints        *Breakpoints
	StopOnEntry        bool
	DisableBreakpoints bool
	CleanupAll         bool
}

type Handler

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

func (*Handler) BreakEachVertex

func (h *Handler) BreakEachVertex(b bool)

func (*Handler) Breakpoints

func (h *Handler) Breakpoints() *Breakpoints

func (*Handler) DebuggerImage

func (h *Handler) DebuggerImage() gwclient.Reference

func (*Handler) GatewayClient

func (h *Handler) GatewayClient() gwclient.Client

type Location

type Location struct {
	Source *pb.SourceInfo
	Ranges []*pb.Range
}

func (*Location) String

func (l *Location) String() string

type RegisteredStatus

type RegisteredStatus struct {
	Name     string
	DebugID  string
	InputIDs []string
	MountIDs []string
	Vertex   digest.Digest
	Op       *pb.Op
	Err      error
}

Jump to

Keyboard shortcuts

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