Documentation
¶
Overview ¶
Package networkcommand owns explicit setup and read-only network diagnostics. It has no transfer engine authority: changing a host rule cannot change a task's selected connectivity mode or its retry behavior.
Index ¶
Constants ¶
const ( ResultOK = 0 ResultFailure = 1 ResultUsage = 2 )
Variables ¶
This section is empty.
Functions ¶
func ObserveStartup ¶
func ObserveStartup(reader StartupReader, observer Observer, command clievent.Command)
ObserveStartup reads only installation history. Keeping this port separate from Check prevents diagnostics from leaking into ordinary transfer startup.
Types ¶
type LineOutput ¶
type LineOutput interface {
WriteLines(...string)
}
LineOutput commits complete diagnostic records immediately. Embedded line breaks belong to the record; a trailing newline is not required.
type Runner ¶
type Runner struct {
Service Service
Output LineOutput
JSONOutput io.Writer
Interactive func() bool
}
type Service ¶
type Service interface {
Check(context.Context) platformsetup.Report
Setup(context.Context, platformsetup.RuleAction, bool) (platformsetup.Operation, platformsetup.Report)
Skip() error
// SupportsSetup reports whether this host can apply executable firewall
// rules. Explicit setup prints the Windows consent preamble only when true.
SupportsSetup() bool
}
type StartupReader ¶
type StartupReader interface {
Startup() platformsetup.StartupReport
}