convert

package
v0.0.0-...-960f7d7 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2023 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package convert provides LLB converter.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildLLB

func BuildLLB(graph *solver.PackageGraph, options *environment.Options) (llb.State, error)

BuildLLB translates package graph into LLB DAG.

func MarshalLLB

func MarshalLLB(graph *solver.PackageGraph, options *environment.Options) (*llb.Definition, error)

MarshalLLB translates package graph into LLB DAG and marshals it.

Types

type GraphLLB

type GraphLLB struct {
	*solver.PackageGraph

	Options *environment.Options

	BaseImages   map[v1alpha1.Variant]llb.State
	Checksummer  llb.State
	LocalContext llb.State
	// contains filtered or unexported fields
}

GraphLLB wraps PackageGraph to provide LLB conversion.

GraphLLB caches common images used in the build.

func NewGraphLLB

func NewGraphLLB(graph *solver.PackageGraph, options *environment.Options) *GraphLLB

NewGraphLLB creates new GraphLLB and initializes shared images.

func (*GraphLLB) Build

func (graph *GraphLLB) Build() (llb.State, error)

Build converts package graph to LLB.

func (*GraphLLB) Marshal

func (graph *GraphLLB) Marshal() (*llb.Definition, error)

Marshal returns marshaled LLB.

type NodeLLB

type NodeLLB struct {
	*solver.PackageNode

	Graph  *GraphLLB
	Prefix string
}

NodeLLB wraps PackageNode to provide LLB conversion.

func NewNodeLLB

func NewNodeLLB(node *solver.PackageNode, graph *GraphLLB) *NodeLLB

NewNodeLLB wraps PackageNode for LLB conversion.

func (*NodeLLB) Build

func (node *NodeLLB) Build() (llb.State, error)

Build converts PackageNode to buildkit LLB.

Jump to

Keyboard shortcuts

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