config

package
v2.0.0-beta.7 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2026 License: Apache-2.0 Imports: 8 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 config reads warmctl's host settings: where short image names resolve, which mirrors and cache to try first. /etc/warmctl/config.yaml is read first, ~/.config/warmctl/config.yaml overrides it, and the environment overrides both.

Index

Constants

View Source
const DefaultRegistry = "registry.warmctl.io/warmctl"

DefaultRegistry is where short names resolve when nothing says otherwise.

Variables

View Source
var Files = func() []string {
	files := []string{"/etc/warmctl/config.yaml"}
	if dir, err := os.UserConfigDir(); err == nil {
		files = append(files, filepath.Join(dir, "warmctl", "config.yaml"))
	}
	return files
}

Files are read in order; a later one overrides the fields it sets.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Registry is a registry host and namespace: `up glm53-flash` pulls
	// oci://<Registry>/glm53-flash:latest.
	Registry string `yaml:"registry"`
	// Mirrors hold copies of Registry's repositories, tried before it.
	Mirrors []string `yaml:"mirrors"`
	// Cache is a directory, usually on a shared file system, holding OCI
	// image layouts of pulled snapshots, tried before any registry.
	Cache string `yaml:"cache"`
}

Config is the merged settings.

func Load

func Load() (Config, error)

Load merges the files and then WARMCTL_REGISTRY, WARMCTL_MIRRORS (comma separated) and WARMCTL_CACHE.

Jump to

Keyboard shortcuts

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