command

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConsensusFlag  = "consensus"
	NoDiscoverFlag = "no-discover"
	BootnodeFlag   = "bootnode"
	LogLevelFlag   = "log-level"
)
View Source
const (
	DefaultGenesisFileName = "genesis.json"
	DefaultChainName       = "dogechain"
	DefaultChainID         = 100
	DefaultPremineBalance  = "0x3635C9ADC5DEA00000" // 1000 ETH
	DefaultConsensus       = server.IBFTConsensus
	DefaultGenesisGasUsed  = 458752  // 0x70000
	DefaultGenesisGasLimit = 5242880 // 0x500000
)
View Source
const (
	JSONOutputFlag     = "json"
	GRPCAddressFlag    = "grpc-address"
	JSONRPCFlag        = "jsonrpc"
	GraphQLAddressFlag = "graphql-address"
	PprofFlag          = "pprof"
	PprofAddressFlag   = "pprof-address"
)
View Source
const (
	GRPCAddressFlagLEGACY = "grpc"
)

Legacy flag that needs to be present to preserve backwards compatibility with running clients

Variables

This section is empty.

Functions

func InitializePprofServer added in v1.1.3

func InitializePprofServer(cmd *cobra.Command)

Types

type CLIOutput

type CLIOutput struct {
	// contains filtered or unexported fields
}

func (*CLIOutput) SetCommandResult

func (c *CLIOutput) SetCommandResult(result CommandResult)

func (*CLIOutput) SetError

func (c *CLIOutput) SetError(err error)

func (*CLIOutput) WriteOutput

func (cli *CLIOutput) WriteOutput()

type CommandResult

type CommandResult interface {
	GetOutput() string
}

type JSONOutput

type JSONOutput struct {
	// contains filtered or unexported fields
}

func (*JSONOutput) SetCommandResult

func (c *JSONOutput) SetCommandResult(result CommandResult)

func (*JSONOutput) SetError

func (c *JSONOutput) SetError(err error)

func (*JSONOutput) WriteOutput

func (jo *JSONOutput) WriteOutput()

type OutputFormatter

type OutputFormatter interface {

	// SetError sets the encountered error
	SetError(err error)

	// SetCommandResult sets the result of the command execution
	SetCommandResult(result CommandResult)

	// WriteOutput writes the result / error output
	WriteOutput()
	// contains filtered or unexported methods
}

OutputFormatter is the standardized interface all output formatters should use

func InitializeOutputter

func InitializeOutputter(cmd *cobra.Command) OutputFormatter

Jump to

Keyboard shortcuts

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