Help us shape the future of Go! Take the 2026 Go Developer Survey

distro

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package distro provides Linux distribution management.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DistroDefinition

type DistroDefinition struct {
	Name           string         `yaml:"name"`
	Description    string         `yaml:"description"`
	DefaultVersion string         `yaml:"default_version"`
	Source         DistroSource   `yaml:"source"`
	Packages       PackageManager `yaml:"packages"`
	Aliases        []string       `yaml:"aliases"`
}

type DistroManager

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

func NewDistroManager

func NewDistroManager(homeDir string, imageStore *image.Store) (*DistroManager, error)

func (*DistroManager) EnsureInstalled

func (m *DistroManager) EnsureInstalled(def *DistroDefinition) error

func (*DistroManager) GetRootfsPath

func (m *DistroManager) GetRootfsPath(name string) string

func (*DistroManager) IsInstalled

func (m *DistroManager) IsInstalled(name string) bool

func (*DistroManager) List

func (m *DistroManager) List() []string

func (*DistroManager) RegisterDef

func (m *DistroManager) RegisterDef(def *DistroDefinition)

RegisterDef adds a custom distro definition.

func (*DistroManager) Remove

func (m *DistroManager) Remove(name string) error

Remove deletes an installed distro.

func (*DistroManager) Resolve

func (m *DistroManager) Resolve(name string) (*DistroDefinition, error)

func (*DistroManager) Search

func (m *DistroManager) Search(query string) []string

Search looks for available pre-defined distros by name.

func (*DistroManager) Update

func (m *DistroManager) Update(def *DistroDefinition) error

Update re-pulls and re-extracts a distro.

type DistroSource

type DistroSource struct {
	Type     SourceType `yaml:"type"`
	Image    string     `yaml:"image"`
	Tag      string     `yaml:"tag"`
	Registry string     `yaml:"registry"`
}

type InstalledDistro

type InstalledDistro struct {
	Name        string    `json:"name"`
	Version     string    `json:"version"`
	InstalledAt time.Time `json:"installed_at"`
	Size        int64     `json:"size"`
	Source      string    `json:"source"`
	RootfsPath  string    `json:"rootfs_path"`
}

type PackageManager

type PackageManager struct {
	Manager string `yaml:"manager"`
	Update  string `yaml:"update"`
	Install string `yaml:"install"`
}

type SourceType

type SourceType string
const (
	SourceDocker SourceType = "docker"
)

Jump to

Keyboard shortcuts

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