nftmissing

package
v0.2.2-dev.2 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: AGPL-3.0 Imports: 4 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 nftmissing names one failure the agent meets on a server without the nft command (a cloud image of Debian 13 ships without the nftables package): what hostctl and warp return for it, how the agent says it once instead of every cycle, and where to look for the command.

Index

Constants

This section is empty.

Variables

View Source
var ErrMissing = errors.New("nft is not installed")

ErrMissing is wrapped by every failure that comes from the nft command not being there. Its text is the one the agent always used, so a log search for it keeps working.

Functions

func InstallHint

func InstallHint() string

InstallHint is the one command that puts the package on the server, in the words of the owner's package manager.

func Installed

func Installed() bool

Installed reports whether the nft command exists: on PATH, else in the usual system directories.

func Is

func Is(err error) bool

Is reports whether err, or any error joined into it, is the missing-nft failure.

func Rest

func Rest(err error) error

Rest is err without the missing-nft failures: what is left to log when the missing command is reported on its own. It is nil when nothing else failed.

Types

type Watch

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

Watch turns a failure that repeats every cycle into two facts: it appeared, it is gone.

func (*Watch) Appeared

func (w *Watch) Appeared() (first bool)

Appeared records a failure caused by the missing command. first is true only for the first of a run of them.

func (*Watch) Gone

func (w *Watch) Gone() bool

Gone records that nft worked again. It is true only when the failure had been recorded.

Jump to

Keyboard shortcuts

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