Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Config settings ConfigFileFlag = cli.StringFlag{ Name: "config", Usage: "Json configuration file", } // General settings DataDirFlag = DirectoryFlag{ Name: "datadir", Usage: "use for store all files", } KeyStoreDirFlag = DirectoryFlag{ Name: "keystore", Usage: "Directory for the keystore (default = inside the datadir)", } // Network Settings TestNetFlag = cli.BoolFlag{ Name: "testnet", Usage: "Ropsten network: pre-configured proof-of-work test network", } DevNetFlag = cli.BoolFlag{ Name: "devnet", Usage: "Rinkeby network: pre-configured proof-of-authority dev network", } MainNetFlag = cli.BoolFlag{ Name: "mainnet", Usage: "Rinkeby network: pre-configured proof-of-authority prod network", } IdentityFlag = cli.StringFlag{ Name: "identity", Usage: "Custom node name", } NetworkIdFlag = cli.UintFlag{ Name: "networkid", Usage: "Network identifier (integer," + " 1=MainNet," + " 2=TestNet," + " 3~12=DevNet,)", Value: config.GlobalConfig.NetID, } MaxPeersFlag = cli.UintFlag{ Name: "maxpeers", Usage: "Maximum number of network peers (network disabled if set to 0)", Value: config.GlobalConfig.MaxPeers, } MaxPendingPeersFlag = cli.UintFlag{ Name: "maxpendpeers", Usage: "Maximum number of pending connection attempts (defaults used if set to 0)", Value: config.GlobalConfig.MaxPeers, } ListenPortFlag = cli.IntFlag{ Name: "port", Usage: "Network listening port", Value: common.DefaultP2PPort, } NodeKeyHexFlag = cli.StringFlag{ Name: "nodekeyhex", Usage: "P2P node key as hex", } //IPC Settings IPCEnabledFlag = cli.BoolFlag{ Name: "ipc", Usage: "Enable the IPC-RPC server", } IPCPathFlag = DirectoryFlag{ Name: "ipcpath", Usage: "Filename for IPC socket/pipe within the datadir (explicit paths escape it)", } //HTTP RPC Settings RPCEnabledFlag = cli.BoolFlag{ Name: "rpc", Usage: "Enable the HTTP-RPC server", } RPCListenAddrFlag = cli.StringFlag{ Name: "rpcaddr", Usage: "HTTP-RPC server listening interface", Value: common.DefaultHTTPHost, } RPCPortFlag = cli.IntFlag{ Name: "rpcport", Usage: "HTTP-RPC server listening port", Value: common.DefaultHTTPPort, } //WS Settings WSEnabledFlag = cli.BoolFlag{ Name: "ws", Usage: "Enable the WS-RPC server", } WSListenAddrFlag = cli.StringFlag{ Name: "wsaddr", Usage: "WS-RPC server listening interface", Value: common.DefaultWSHost, } WSPortFlag = cli.IntFlag{ Name: "wsport", Usage: "WS-RPC server listening port", Value: common.DefaultWSPort, } //Console Settings JSPathFlag = cli.StringFlag{ Name: "jspath", Usage: "JavaScript root path for `loadScript`", Value: ".", } ExecFlag = cli.StringFlag{ Name: "exec", Usage: "Execute JavaScript statement", } PreloadJSFlag = cli.StringFlag{ Name: "preload", Usage: "Comma separated list of JavaScript files to preload into the console", } //Producer MinerFlag = cli.BoolFlag{ Name: "miner", Usage: "Enable the Miner", } CoinBaseFlag = cli.StringFlag{ Name: "coinbase", Usage: "Coinbase is an address into which the rewards for the SuperNode produce snapshot-block", } MinerIntervalFlag = cli.IntFlag{ Name: "minerinterval", Usage: "Miner Interval(unit: second)", } )
View Source
var (
CommandHelpTemplate = `` /* 471-byte string literal not displayed */
)
Functions ¶
func AbsolutePath ¶
AbsolutePath returns datadir + filename, or filename if it is absolute.
func MigrateFlags ¶
This allows the use of the existing configuration functionality. When all flags are migrated this function can be removed and the existing configuration functionality must be changed that is uses local flags
Types ¶
type DirectoryFlag ¶
type DirectoryFlag struct { Name string Value DirectoryString Usage string }
Custom cli.Flag type which expand the received string to an absolute path. e.g. ~/viteisbest -> /home/username/viteisbest
func (DirectoryFlag) Apply ¶
func (self DirectoryFlag) Apply(set *flag.FlagSet)
called by cli library, grabs variable from environment (if in env) and adds variable to flag set for parsing.
func (DirectoryFlag) GetName ¶
func (self DirectoryFlag) GetName() string
func (*DirectoryFlag) Set ¶
func (self *DirectoryFlag) Set(value string)
func (DirectoryFlag) String ¶
func (self DirectoryFlag) String() string
type DirectoryString ¶
type DirectoryString struct {
Value string
}
func (*DirectoryString) Set ¶
func (self *DirectoryString) Set(value string) error
func (*DirectoryString) String ¶
func (self *DirectoryString) String() string
Click to show internal directories.
Click to hide internal directories.