config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 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 {
	Destination    string
	ParallelProbes uint
	NumProbes      uint
	MaxTTL         uint
	NoResolve      bool

	// Protocol and ports
	TCP             bool
	UDP             bool
	ForceIPv4       bool
	ForceIPv6       bool
	DestinationPort uint
	SourcePort      uint

	// Timing
	InterProbeDelay time.Duration
	InterTTLDelay   time.Duration
	Timeout         time.Duration

	// Output
	Json     bool   // output json to stdout
	JsonFile string // output json to file while showing TUI

	// Path hashing
	HashAlgorithm string // hash algorithm: crc32, sha256

	// Logging
	Log      string // log file path, empty means no logging
	LogLevel string // log level: debug, info, warn, error
}

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