commands

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:              "babble",
	Short:            "babble consensus",
	TraverseChildren: true,
}

RootCmd is the root command for Babble

View Source
var VersionCmd = &cobra.Command{
	Use:   "version",
	Short: "Show version info",
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println(version.Version)
	},
}

VersionCmd displays the version of babble being used

Functions

func AddKeygenFlags

func AddKeygenFlags(cmd *cobra.Command)

AddKeygenFlags adds flags to the keygen command

func AddRunFlags

func AddRunFlags(cmd *cobra.Command)

AddRunFlags adds flags to the Run command

func NewKeygenCmd

func NewKeygenCmd() *cobra.Command

NewKeygenCmd produces a KeygenCmd which create a key pair

func NewRunCmd

func NewRunCmd() *cobra.Command

NewRunCmd returns the command that starts a Babble node

Types

type CLIConfig

type CLIConfig struct {
	Babble     config.Config `mapstructure:",squash"`
	ProxyAddr  string        `mapstructure:"proxy-listen"`
	ClientAddr string        `mapstructure:"client-connect"`
}

CLIConfig contains configuration for the Run command

func NewDefaultCLIConfig

func NewDefaultCLIConfig() *CLIConfig

NewDefaultCLIConfig creates a CLIConfig with default values

Jump to

Keyboard shortcuts

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