Documentation ¶
Index ¶
- Variables
- func Fatalf(format string, args ...interface{})
- func MigrateFlags(action func(ctx *cli.Context) error) func(*cli.Context) error
- func NewApp(gitCommit, usage string) *cli.App
- func RegisterEwsService(stack *node.Node, cfg *ews.Config)
- func SetEwsConfig(ctx *cli.Context, cfg *ews.Config)
- func SetNSQ(ctx *cli.Context, cfg *ews.Config)
- func SetNodeConfig(ctx *cli.Context, cfg *node.Config)
- func StartNode(stack *node.Node)
Constants ¶
This section is empty.
Variables ¶
var ( // 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: node.DefaultHTTPHost, } RPCPortFlag = cli.IntFlag{ Name: "rpcport", Usage: "HTTP-RPC server listening port", Value: node.DefaultHTTPPort, } RPCCORSDomainFlag = cli.StringFlag{ Name: "rpccorsdomain", Usage: "Comma separated list of domains from which to accept cross origin requests (browser enforced)", Value: "", } RPCVirtualHostsFlag = cli.StringFlag{ Name: "rpcvhosts", Usage: "Comma separated list of virtual hostnames from which to accept requests (server enforced). Accepts '*' wildcard.", Value: strings.Join(node.DefaultConfig.HTTPVirtualHosts, ","), } RPCApiFlag = cli.StringFlag{ Name: "rpcapi", Usage: "API's offered over the HTTP-RPC interface", Value: "", } WSEnabledFlag = cli.BoolFlag{ Name: "ws", Usage: "Enable the WS-RPC server", } WSListenAddrFlag = cli.StringFlag{ Name: "wsaddr", Usage: "WS-RPC server listening interface", Value: node.DefaultWSHost, } WSPortFlag = cli.IntFlag{ Name: "wsport", Usage: "WS-RPC server listening port", Value: node.DefaultWSPort, } WSApiFlag = cli.StringFlag{ Name: "wsapi", Usage: "API's offered over the WS-RPC interface", Value: "", } WSAllowedOriginsFlag = cli.StringFlag{ Name: "wsorigins", Usage: "Origins from which to accept websockets requests", Value: "", } IdentityFlag = cli.StringFlag{ Name: "identity", Usage: "Custom node name", } // 采集 https://ethgasstation.info/json Ethgasstation = cli.BoolFlag{ Name: "ethgasstation", Usage: "Enable crawling https://ethgasstation.info/json", } // NSQ NSQNslookupHostFlag = cli.StringFlag{ Name: "nsqnslookup", Usage: "nsq nsqlookupd host", Value: ews.DefaultNSQNslookupHost, } NSQNslookupIntervalFlag = cli.Int64Flag{ Name: "nsqnslookupinterval", Usage: "nsqLookupInterval x seconds", Value: ews.DefaultNSQNslookupInterval, } )
var (
CommandHelpTemplate = `` /* 471-byte string literal not displayed */
)
Functions ¶
func MigrateFlags ¶
MigrateFlags sets the global flag from a local flag when it's set. This is a temporary function used for migrating old command/flags to the new format.
e.g. geth account new --keystore /tmp/mykeystore --lightkdf
is equivalent after calling this method with:
geth --keystore /tmp/mykeystore --lightkdf account new
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
func NewApp ¶
func NewApp(gitCommit, usage string) *cli.App
NewApp creates an app with sane defaults.
func RegisterEwsService ¶
RegisterEthService adds an Ethereum client to the stack.
func SetEwsConfig ¶
func SetNodeConfig ¶
SetNodeConfig applies node-related command line flags to the config.
Types ¶
This section is empty.