artifacts

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: Apache-2.0 Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package artifacts downloads the pinned Firecracker release and guest image for this machine into the state directory and verifies them against SHA-256 checksums compiled into the binary.

Index

Constants

View Source
const DirName = "artifacts"

DirName is the artifact cache's directory name inside the state directory.

Variables

This section is empty.

Functions

func DesktopRootfs added in v0.1.2

func DesktopRootfs(ctx context.Context, dir string) (string, error)

DesktopRootfs fetches and unpacks the pinned desktop disk on demand into the base image's versioned directory. The base and desktop share a kernel.

func Rootfs

func Rootfs(ctx context.Context, p Paths) (string, error)

Rootfs decompresses the fetched rootfs next to it, once, and returns the path of the ext4 image. Backends copy or clone it per sandbox and never write to it.

func UnpackOnce

func UnpackOnce(ctx context.Context, dst string, mode os.FileMode, fill func(*os.File) error) error

UnpackOnce creates dst with fill unless it exists. fill writes a temp file that is renamed into place, so dst is never left partial.

Types

type Paths

type Paths struct {
	Firecracker string // empty on macOS
	Kernel      string
	Rootfs      string
}

Paths are the local paths of the fetched artifacts, in their published form: the Firecracker release tarball and the zstd-compressed ext4 rootfs are not unpacked here.

func Fetch

func Fetch(ctx context.Context, dir string) (Paths, error)

Fetch downloads the base artifacts into dir/<imageVersion>. Versioned directories prevent UnpackOnce from reusing a previous release's rootfs.

Jump to

Keyboard shortcuts

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