Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checkpoint ¶
type Checkpoint struct {
DatasetPrefix string `toml:"dataset_prefix" env:"PIXELS_CHECKPOINT_DATASET_PREFIX"`
}
type Config ¶
type Config struct {
TrueNAS TrueNAS `toml:"truenas"`
Defaults Defaults `toml:"defaults"`
SSH SSH `toml:"ssh"`
Checkpoint Checkpoint `toml:"checkpoint"`
Provision Provision `toml:"provision"`
Network Network `toml:"network"`
RawEnv map[string]any `toml:"env"`
// Resolved env vars (not from TOML directly).
Env map[string]string `toml:"-"` // image vars → /etc/environment
EnvForward map[string]string `toml:"-"` // session vars → SSH SetEnv
}
type Defaults ¶
type Defaults struct {
Image string `toml:"image" env:"PIXELS_DEFAULT_IMAGE"`
CPU string `toml:"cpu" env:"PIXELS_DEFAULT_CPU"`
Memory int64 `toml:"memory" env:"PIXELS_DEFAULT_MEMORY"` // MiB
Pool string `toml:"pool" env:"PIXELS_DEFAULT_POOL"`
NICType string `toml:"nic_type"` // "macvlan" or "bridged"
Parent string `toml:"parent"` // parent interface (e.g. "eno1", "br0")
Network string `toml:"network"` // Incus network name (e.g. "incusbr0")
DNS []string `toml:"dns"` // nameservers to write into containers
}
type Network ¶
type Network struct {
Egress string `toml:"egress" env:"PIXELS_NETWORK_EGRESS"`
Allow []string `toml:"allow"`
}
func (*Network) IsRestricted ¶
type Provision ¶
type Provision struct {
Enabled *bool `toml:"enabled" env:"PIXELS_PROVISION_ENABLED"`
DevTools *bool `toml:"devtools" env:"PIXELS_PROVISION_DEVTOOLS"`
}
func (*Provision) DevToolsEnabled ¶
type TrueNAS ¶
type TrueNAS struct {
Host string `toml:"host" env:"PIXELS_TRUENAS_HOST"`
Port int `toml:"port" env:"PIXELS_TRUENAS_PORT"`
Username string `toml:"username" env:"PIXELS_TRUENAS_USERNAME"`
APIKey string `toml:"api_key" env:"PIXELS_TRUENAS_API_KEY"`
InsecureSkipVerify *bool `toml:"insecure_skip_verify" env:"PIXELS_TRUENAS_INSECURE"`
}
func (*TrueNAS) InsecureSkipVerifyValue ¶
InsecureSkipVerify returns whether TLS verification should be skipped. Defaults to true (skip) when not explicitly set, since most TrueNAS boxes use self-signed certs.
Click to show internal directories.
Click to hide internal directories.