config

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: MIT Imports: 7 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
	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.

func Parse

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

Parse decodes and validates a configuration.

type Credential added in v0.2.0

type Credential struct {
	Host, Username, Password string
}

Credential supplies HTTP Basic auth to one host when a layer's Source is fetched over https. Password may be a literal or an exact "${VAR}" environment reference, expanded at parse time.

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
	Source string
	Base   string
	Dist   string
	Stand  string
	Boot   bool
}

Layer is one ordered source (local path or http(s) URL) contributing files to an install set. Base, when set, rebases the layer to a subtree of Source. Dist and Stand default to "dist" and "stand" within that source; a version-stub disc sets Dist to its real catalog (e.g. "dist6.5") to unwrap a .redirect. Boot marks the at-most-one layer per set whose stand directory the PROM fetches fx.64 from.

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