config

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2021 License: ISC Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActiveNetParams

func ActiveNetParams() *dagconfig.Params

ActiveNetParams returns the currently active net params

func Parse

func Parse() error

Parse parses the CLI arguments and returns a config struct.

Types

type Config

type Config struct {
	ShowVersion bool    `short:"V" long:"version" description:"Display version information and exit"`
	LogDir      string  `long:"logdir" description:"Directory to log output."`
	HTTPListen  string  `long:"listen" description:"HTTP address to listen on default: 0.0.0.0:8081)"`
	RPCServer   string  `long:"rpcserver" short:"s" description:"RPC server to connect to"`
	PrivateKey  string  `long:"private-key" description:"Faucet Private key"`
	DBAddress   string  `long:"dbaddress" description:"Database address" default:"localhost:5432"`
	DBSSLMode   string  `` /* 171-byte string literal not displayed */
	DBUser      string  `long:"dbuser" description:"Database user" required:"true"`
	DBPassword  string  `long:"dbpass" description:"Database password" required:"true"`
	DBName      string  `long:"dbname" description:"Database name" required:"true"`
	Migrate     bool    `long:"migrate" description:"Migrate the database to the latest version. The server will not start when using this flag."`
	FeeRate     float64 `long:"fee-rate" description:"Coins per gram fee rate"`
	TestNet     bool    `long:"testnet" description:"Connect to testnet"`
	SimNet      bool    `long:"simnet" description:"Connect to the simulation test network"`
	DevNet      bool    `long:"devnet" description:"Connect to the development test network"`
	Profile     string  `long:"profile" description:"Enable HTTP profiling on given port -- NOTE port must be between 1024 and 65536"`
}

Config defines the configuration options for the faucet.

func MainConfig

func MainConfig() (*Config, error)

MainConfig is a getter to the main config

Jump to

Keyboard shortcuts

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