bundle

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetadataFilename = "ccbundle.yaml"
	DefaultImageDir  = "image"
)

Variables

This section is empty.

Functions

func IsBundleDir

func IsBundleDir(dir string) bool

func ValidateBundleDir added in v0.0.2

func ValidateBundleDir(dir string) error

ValidateBundleDir validates that a directory is a valid bundle with valid metadata.

func WriteTemplate

func WriteTemplate(dir string, meta Metadata) error

WriteTemplate writes a metadata YAML file. Callers should have already created the bundle directory and any referenced files (image/, icons, etc.).

Types

type BootConfig

type BootConfig struct {
	ImageDir string   `yaml:"imageDir"`
	Command  []string `yaml:"command,omitempty"`

	CPUs     int      `yaml:"cpus,omitempty"`
	MemoryMB uint64   `yaml:"memoryMB,omitempty"`
	Exec     bool     `yaml:"exec,omitempty"`
	Dmesg    bool     `yaml:"dmesg,omitempty"`
	Env      []string `yaml:"env,omitempty"` // Custom environment variables (KEY=value format)
}

type Metadata

type Metadata struct {
	Version     int    `yaml:"version"`
	Name        string `yaml:"name"`
	Description string `yaml:"description"`
	Icon        string `yaml:"icon,omitempty"`

	Boot BootConfig `yaml:"boot"`
}

Metadata describes a prebaked “cc bundle” folder on disk.

func Load

func Load(dir string) (Metadata, *oci.Image, error)

Load reads bundle metadata and loads the prebaked OCI image from disk.

func LoadMetadata

func LoadMetadata(dir string) (Metadata, error)

Jump to

Keyboard shortcuts

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