networkcommand

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: AGPL-3.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

View Source
const (
	ResultOK      = 0
	ResultFailure = 1
	ResultUsage   = 2
)

Variables

This section is empty.

Functions

func IsInteractive

func IsInteractive(input io.Reader, output io.Writer) bool

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 Observer

type Observer interface{ Observe(clievent.Event) bool }

type Runner

type Runner struct {
	Service     Service
	Output      LineOutput
	JSONOutput  io.Writer
	Interactive func() bool
}

func (Runner) Run

func (runner Runner) Run(ctx context.Context, command string, args []string) int

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
}

Jump to

Keyboard shortcuts

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