parser

package
v0.28.2 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: MIT Imports: 17 Imported by: ? 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(args Args)

Init stores the parsed CLI arguments so that subsequent calls to Parse can merge them with config-file and environment-variable sources.

func Parse

func Parse() (*config.Config, error)

Parse reads configuration from the sources specified during Init (config file, CLI services/nodes, and environment variables) and returns a merged Config ready for loading.

Types

type Args

type Args struct {
	// CfgFiles is the list of YAML or JSON config sources: file paths,
	// HTTP(S) URLs, "-" for stdin, or an inline JSON string.
	// Multiple sources are merged left-to-right.
	CfgFiles []string

	// Services is the list of service definitions from -L flags.
	Services []string

	// Nodes is the list of chain-node definitions from -F flags.
	Nodes []string

	// Debug toggles debug-level logging.
	Debug bool

	// Trace toggles trace-level logging (supersedes Debug).
	Trace bool

	// ApiAddr is the address for the HTTP API server.
	ApiAddr string

	// MetricsAddr is the address for the Prometheus metrics endpoint.
	MetricsAddr string
}

Args holds the raw CLI flags and positional arguments that Init will merge into the final configuration.

Jump to

Keyboard shortcuts

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