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 ¶
const DefaultRegistry = "registry.warmctl.io/warmctl"
DefaultRegistry is where short names resolve when nothing says otherwise.
Variables ¶
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.