config

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupLogging

func SetupLogging(args Args) (*os.File, error)

SetupLogging configures the global slog logger based on args Returns the log file handle (caller must close it) or nil if no file

Types

type Args

type Args struct {
	TCP             bool
	UDP             bool
	ForceIPv4       bool
	ForceIPv6       bool
	DestinationPort uint
	SourcePort      uint
	NumProbes       uint
	MaxTTL          uint
	// FIXME: Clean this up
	InterProbeDelay time.Duration
	InterTTLDelay   time.Duration
	Timeout         time.Duration
	Json            bool   // output json to stdout
	JsonFile        string // output json to file while showing TUI
	HashAlgorithm   string // hash algorithm: crc32, sha256
	Log             string // log file path, empty means no logging
	LogLevel        string // log level: debug, info, warn, error
	Destination     string
	ParallelProbes  uint
}

func ParseArgs

func ParseArgs() (Args, error)

func (Args) ProtocolName

func (a Args) ProtocolName() string

ProtocolName returns the protocol name based on args

Jump to

Keyboard shortcuts

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