config

package
v0.4.11 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: ISC Imports: 39 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMaxPeers = 125

	DefaultFreeTxRelayLimit = 15.0

	DefaultBlockMinSize   = 0
	DefaultBlockMaxSize   = 750000
	DefaultBlockMinWeight = 0
	DefaultBlockMaxWeight = 3000000
	BlockMaxSizeMin       = 1000
	BlockMaxSizeMax       = chaindata.MaxBlockBaseSize - 1000

	DefaultMaxOrphanTransactions = 100
)

Variables

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 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. nolint: gocritic, gomnd

func ParseAndSetDebugLevels added in v0.4.10

func ParseAndSetDebugLevels(debugLevel string, logConfig corelog.Config) error

ParseAndSetDebugLevels attempts to parse the specified debug level and set the levels accordingly. An appropriate error is returned if anything is invalid.

nolint: stylecheck

Types

This section is empty.

Jump to

Keyboard shortcuts

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