serve

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: 27 Imported by: 0

Documentation

Overview

Package serve wires the configured services over one install-set tree: bootp answers the configured MACs, tftp and rsh serve the tree, every protocol filters to the configured client IPs. It also generates the operator files instigator serves alongside the media and reports what each set was assembled from. Callers may send PROM and Inst> commands to a separate instructions writer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*options)

Option adjusts Start for tests.

func WithCapture

func WithCapture(dir string) Option

WithCapture turns on the install recorder, writing the run's bundle (run.json, events.jsonl, summary.json) under dir. Unset means no recording and no overhead.

type Servers

type Servers struct {
	// contains filtered or unexported fields
}

Servers is a running instigator instance.

func Start

func Start(cfg *config.Config, logger *logging.Logger, opts ...Option) (*Servers, error)

Start assembles the configured install sets, generates the operator files, binds the enabled services on the configured ports, and serves until Close. logger receives leveled server output; nil is silent, exactly like an unset Logf used to be. -v maps to a DEBUG-level logger at the call site (cmd/instigator), not an option here: verbosity is a property of the logger a caller builds, not a separate flag threaded through every service.

func (*Servers) BOOTPAddr

func (s *Servers) BOOTPAddr() net.Addr

BOOTPAddr returns the bootp socket address.

func (*Servers) Close

func (s *Servers) Close() error

Close shuts every listener and releases the media.

func (*Servers) RSHAddr

func (s *Servers) RSHAddr() net.Addr

RSHAddr returns the rsh listener address.

func (*Servers) TFTPAddr

func (s *Servers) TFTPAddr() net.Addr

TFTPAddr returns the tftp socket address.

Jump to

Keyboard shortcuts

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