config

package
Version: v0.3.13 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2021 License: ISC Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ActiveNetParams = &mainNetParams

ActiveNetParams is a pointer to the parameters specific to the currently active bitcoin network.

View Source
var (
	Log = backendLog.With().Str("app.unit", logUnitJXCD).Logger()
)

Loggers per subsystem. A single backend logger is created and all subsytem loggers created from it will write to the backend. When adding new subsystems, add the subsystem logger variable here and to the unitLogs map.

Loggers can not be used before the log rotator has been initialized with a log file. This must be performed early during application startup by calling initLogRotator.

View Source
var RunServiceCommand func(string) error

RunServiceCommand is only set to a real function on Windows. It is used to parse and execute service commands specified via the -s flag.

Functions

func DoUpgrades

func DoUpgrades(cfg *node.Config) error

DoUpgrades performs upgrades to jaxnetd as new versions require it.

func LoadConfig

func LoadConfig() (*node.Config, []string, error)

LoadConfig initializes and parses the config using a config file and command line options.

The configuration proceeds as follows:

1) Start with a default config with sane settings
2) Pre-parse the command line to check for an alternative config file
3) Load configuration file overwriting defaults with any specified options
4) Parse CLI options and overwrite/add any specified options

The above results in jaxnetd functioning properly without any config settings while still allowing the user to override settings with config files and command line options. Command line options always take precedence.

Types

This section is empty.

Jump to

Keyboard shortcuts

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