config

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: MIT Imports: 7 Imported by: 1 module, 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 config owns command-line, environment and config-file parsing. github.com/lfhy/flag supplies one precedence model for all three sources: command line > environment > config file > defaults.

Index

Constants

This section is empty.

Variables

View Source
var ErrHelp = lfyflag.ErrHelp

ErrHelp is returned when the user asks for --help/-h.

Functions

This section is empty.

Types

type Config

type Config struct {
	InputPath  string
	OutputPath string
	CSVPath    string

	UserDevice    string
	H2CDevice     string
	C2HDevice     string
	Cores         uint
	ChunkBytes    uint64
	LegacyPackets bool
	MmapRegisters bool

	RingSlots          uint
	H2CSlotBytes       uint64
	C2HRequestBytes    uint64
	PacketRequestBytes uint64

	PollInterval     time.Duration
	DrainIdle        time.Duration
	ResetTimeout     time.Duration
	StartTimeout     time.Duration
	ProgressInterval time.Duration
	MaxProcs         uint

	Progress bool
}

Config is the fully typed application configuration after all sources have been merged and validated.

func Parse

func Parse(args []string) (Config, error)

Parse parses arguments using github.com/lfhy/flag. The default config file is config.toml when present; -c/--config selects another file. Positional arguments remain supported as input and output paths for shell compatibility.

Jump to

Keyboard shortcuts

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