config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2026 License: MIT Imports: 6 Imported by: 0

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
}

Config is a validated instigator configuration.

func Parse

func Parse(b []byte) (*Config, error)

Parse decodes and validates a configuration.

type InstallSet

type InstallSet struct {
	Name       string
	Enabled    bool
	Layers     []Layer
	Collisions map[string]string
}

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
	Image string
	Dir   string
	Dist  string
	Boot  bool
}

Layer is one directory or image contributing files to an install set. Exactly one of Image or Dir names its source: Image is a disc image mounted read-only, Dir is a directory served as-is.

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.

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 Ports

type Ports struct {
	BOOTP int
	TFTP  int
	RSH   int
}

Ports holds the listening ports, overridable for unprivileged runs.

type Services

type Services struct {
	BOOTP bool
	TFTP  TFTPService
	RSH   bool
}

Services holds the per-protocol toggles.

type TFTPService

type TFTPService struct {
	Enabled   bool
	PortRange [2]int
}

TFTPService holds the tftp toggle and its transfer port range.

Jump to

Keyboard shortcuts

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