Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var GenNodeKeyCmd = &cobra.Command{
Use: "gen-node-key",
Short: "Generate a node key for this node and print its ID",
RunE: genNodeKey,
}
GenNodeKeyCmd allows the generation of a node key. It prints node's ID to the standard output.
var GenValidatorCmd = &cobra.Command{
Use: "gen-validator",
Short: "Generate new validator keypair",
RunE: genValidator,
}
GenValidatorCmd allows the generation of a keypair for a validator.
var InitFilesCmd = &cobra.Command{
Use: "init",
Short: "Initialize PellDVS",
RunE: initFiles,
}
InitFilesCmd initializes a fresh PellDVS instance.
var RootCmd = &cobra.Command{ Use: "pelldvs", Short: "BFT state machine replication for applications in any programming languages", PersistentPreRunE: func(cmd *cobra.Command, args []string) (err error) { if cmd.Name() == VersionCmd.Name() { return nil } config, err = ParseConfig(cmd) if err != nil { return err } if config.LogFormat == cfg.LogFormatJSON { logger = log.NewLogger(os.Stdout, log.OutputJSONOption()) } if viper.GetBool(cli.TraceFlag) { logger = log.NewTracingLogger(logger) } logger = logger.With("module", "main") return nil }, }
RootCmd is the defaultRoot command for PellDVS core.
var ShowNodeIDCmd = &cobra.Command{ Use: "show-node-id", Aliases: []string{"show_node_id"}, Short: "Show this node's ID", RunE: showNodeID, }
ShowNodeIDCmd dumps node's ID to the standard output.
var ShowValidatorCmd = &cobra.Command{ Use: "show-validator", Aliases: []string{"show_validator"}, Short: "Show this node's validator info", RunE: showValidator, }
ShowValidatorCmd adds capabilities for showing the validator info.
var StartAggregatorCmd = &cobra.Command{
Use: "start-aggregator",
Short: "Start the aggregator",
RunE: startAggregator,
}
StartAggregatorCmd defines the command to start the aggregator
var VersionCmd = &cobra.Command{ Use: "version", Short: "Show version info", Run: func(cmd *cobra.Command, args []string) { cmtVersion := version.TMCoreSemVer if version.TMGitCommitHash != "" { cmtVersion += "+" + version.TMGitCommitHash } if verbose { values, _ := json.MarshalIndent(struct { PellDVS string `json:"pelldvs"` AVSI string `json:"avsi"` BlockProtocol uint64 `json:"block_protocol"` P2PProtocol uint64 `json:"p2p_protocol"` }{ PellDVS: cmtVersion, AVSI: version.AVSIVersion, BlockProtocol: version.BlockProtocol, P2PProtocol: version.P2PProtocol, }, "", " ") fmt.Println(string(values)) } else { fmt.Println(cmtVersion) } }, }
VersionCmd ...
Functions ¶
func AddNodeFlags ¶
AddNodeFlags exposes some common configuration options on the command-line These are exposed for convenience of commands embedding a PellDVS node
func NewRunNodeCmd ¶
NewRunNodeCmd returns the command that allows the CLI to start a node. It can be used with a custom PrivValidator and in-process AVSI application.
Types ¶
This section is empty.