builder

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOverlayBDBuilderEngine

func NewOverlayBDBuilderEngine(base *builderEngineBase) builderEngine

func NewTurboOCIBuilderEngine added in v1.0.0

func NewTurboOCIBuilderEngine(base *builderEngineBase) builderEngine

Types

type Builder

type Builder interface {
	Build(ctx context.Context) error
}

func NewOverlayBDBuilder

func NewOverlayBDBuilder(ctx context.Context, opt BuilderOptions) (Builder, error)

type BuilderEngineType

type BuilderEngineType int
const (
	Overlaybd BuilderEngineType = iota
	TurboOCI
)

type BuilderOptions

type BuilderOptions struct {
	Ref       string
	TargetRef string
	Auth      string
	PlainHTTP bool
	WorkDir   string
	OCI       bool
	Mkfs      bool
	Vsize     int
	DB        database.ConversionDatabase
	Engine    BuilderEngineType
	CertOption
	Reserve      bool
	NoUpload     bool
	DumpManifest bool
}

type CertOption added in v1.0.1

type CertOption struct {
	CertDirs    []string
	RootCAs     []string
	ClientCerts []string
	Insecure    bool
}

-------------------- certification --------------------

type Deduplicateable added in v1.0.3

type Deduplicateable interface {
	// deduplication functions
	// finds already converted layer in db and validates presence in registry
	CheckForConvertedLayer(ctx context.Context, idx int) (specs.Descriptor, error)

	// downloads the already converted layer
	DownloadConvertedLayer(ctx context.Context, idx int, desc specs.Descriptor) error

	// store chainID -> converted layer mapping for layer deduplication
	StoreConvertedLayerDetails(ctx context.Context, idx int) error

	// store manifest digest -> converted manifest to avoid re-conversion
	CheckForConvertedManifest(ctx context.Context) (specs.Descriptor, error)

	// store manifest digest -> converted manifest to avoid re-conversion
	StoreConvertedManifestDetails(ctx context.Context) error
}

Deduplicateable provides a number of functions to avoid duplicating work when converting images It is used by the builderEngine to avoid re-converting layers and manifests

Jump to

Keyboard shortcuts

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