Documentation
¶
Overview ¶
Package config parses instigator's YAML configuration into validated, strongly typed values: addresses as netip types, MACs parsed, service toggles and ports defaulted.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
Name string
MAC net.HardwareAddr
IP netip.Addr
}
Client is one machine instigator answers.
type Config ¶
type Config struct {
ServerIP netip.Addr
Netmask netip.Prefix
Clients []Client
InstallSets []InstallSet
Services Services
Ports Ports
Credentials []Credential
// CacheDir is where a fetched or extracted remote source is cached;
// empty means the caller (serve) supplies its own default.
CacheDir string
}
Config is a validated instigator configuration.
type Credential ¶ added in v0.2.0
type Credential struct {
Host, Username, Password string
}
Credential is HTTP Basic auth offered to one host when a layer's Source is fetched over https. Password is expanded from a "${VAR}" environment reference at parse time, so the config file itself never carries a secret in the clear.
type InstallSet ¶
InstallSet is one served IRIX install tree, assembled by layering Layers in the given order. Every configured set is always built and served (browsable); Enabled controls only whether the set is offered in the generated command file and Inst> instructions. Collisions records, for a full logical path written by more than one layer, which layer's copy wins.
type Layer ¶
type Layer struct {
Name string
Source string
Base string
Dist string
Stand string
Sha256 string
Boot bool
}
Layer is one directory, image, or remote archive contributing files to an install set. Source names it: a local path (a disc image or a directory) or an http(s) URL (a raw image, fetched by byte-range or whole, or a tar/gz archive extracted into the cache). Base, when set, selects a subtree of Source rather than serving it whole - the layer's files are those under Base, rebased to the layer's root. Sha256, when set, is the digest a whole-file fetch of Source is verified against.
Dist is the distribution directory inside that source, defaulting to "dist"; whatever it is called there, it merges into the set's own dist. A version-stub disc names its real catalog instead ("dist6.5", or "dist/dist6.5" where the disc hides it behind a .redirect), which rebases it so inst only ever sees /<set>/dist.
Stand names the stand directory inside Source, defaulting like Dist to the layer's own "stand". Boot marks the layer whose stand directory is served at /<set>/stand, where the PROM fetches fx.64. At most one layer per set may set it, and only a set an operator actually netboots needs one at all.
type Services ¶
type Services struct {
BOOTP bool
TFTP TFTPService
RSH bool
}
Services holds the per-protocol toggles.
type TFTPService ¶
TFTPService holds the tftp toggle and its transfer port range.