build

package
v0.0.0-...-39f9dfc Latest Latest
Warning

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

Go to latest
Published: May 6, 2025 License: Apache-2.0 Imports: 49 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ToMBShift = 20
)

Variables

View Source
var EnvInstanceTemplate = template.Must(template.New("provisioning-script").Parse(provisionEnvScriptFile))

Functions

This section is empty.

Types

type Env

type Env struct {
	*storage.TemplateFiles

	// Command to run when building the env.
	StartCmd string

	// The number of vCPUs to allocate to the VM.
	VCpuCount int64

	// The amount of RAM memory to allocate to the VM, in MiB.
	MemoryMB int64

	// The amount of free disk to allocate to the VM, in MiB.
	DiskSizeMB int64

	// Path to the directory where the temporary files for the build are stored.
	BuildLogsWriter io.Writer
	// contains filtered or unexported fields
}

func (*Env) Build

func (e *Env) Build(ctx context.Context, tracer trace.Tracer, postProcessor *writer.PostProcessor, docker *client.Client, legacyDocker *docker.Client) error

func (*Env) Remove

func (e *Env) Remove(ctx context.Context, tracer trace.Tracer) error

func (*Env) RootfsSizeMB

func (e *Env) RootfsSizeMB() int64

Real size in MB of rootfs after building the env

type FCNetwork

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

func NewFCNetwork

func NewFCNetwork(ctx context.Context, tracer trace.Tracer, postProcessor *writer.PostProcessor, env *Env) (*FCNetwork, error)

func (*FCNetwork) Cleanup

func (n *FCNetwork) Cleanup(ctx context.Context, tracer trace.Tracer)

type MultiWriter

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

func (*MultiWriter) Write

func (mw *MultiWriter) Write(p []byte) (int, error)

type Rootfs

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

func NewRootfs

func NewRootfs(ctx context.Context, tracer trace.Tracer, postProcessor *writer.PostProcessor, env *Env, docker *client.Client, legacyDocker *docker.Client) (*Rootfs, error)

type Snapshot

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

func NewSnapshot

func NewSnapshot(ctx context.Context, tracer trace.Tracer, postProcessor *writer.PostProcessor, env *Env, network *FCNetwork, rootfs *Rootfs) (*Snapshot, error)

type TemplateBuilder

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

func NewBuilder

func NewBuilder(
	logger *zap.Logger,
	buildLogger *zap.Logger,
	tracer trace.Tracer,
	dockerClient *client.Client,
	legacyDockerClient *docker.Client,
	templateStorage *template.Storage,
	buildCache *cache.BuildCache,
	storage storage.StorageProvider,
) *TemplateBuilder

func (*TemplateBuilder) Build

func (b *TemplateBuilder) Build(ctx context.Context, template *Env, envID string, buildID string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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