Documentation
¶
Overview ¶
Package app wires the pieces together: it takes a validated configuration, resolves addressing, runs the safety checks and drives the dataplane.
Both front ends go through here, so a run started from the wizard and one started with --no-tui are the same run, validated the same way.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PrepareOptions ¶
type PrepareOptions struct {
// Source overrides system discovery; nil uses the real kernel.
Source discovery.Source
// Logf receives dataplane messages during the run.
Logf func(format string, args ...any)
// Session keeps the XDP program attached between runs. An interactive
// session passes one so a rerun does not pay the attach cost again; the
// one-shot --no-tui path leaves it nil.
Session *dataplane.Session
}
PrepareOptions tunes preparation.
type Prepared ¶
type Prepared struct {
Runner *dataplane.Runner
Resolved *discovery.Resolved
Preflight *dataplane.Preflight
Plan dataplane.FilterPlan
Frames generator.FrameSource
}
Prepare turns a configuration into a ready-to-start Runner, doing every step that must happen before an XDP program is attached: validation, PCAP loading, address and next-hop resolution, and the preflight checks.
It returns the runner, the preflight result and the resolved addressing so a front end can show a review screen. Nothing has touched the interface yet.