Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var EthereumCommand = &cobra.Command{ Use: "ethereum", Short: `Provides access to Keep network Ethereum contracts.`, Long: ethereumDescription, PersistentPreRun: func(cmd *cobra.Command, args []string) { if err := clientConfig.ReadConfig(configFilePath, cmd.Flags(), config.General, config.Ethereum); err != nil { logger.Fatalf("error reading config: %v", err) } beaconcmd.ModuleCommand.SetConfig(&clientConfig.Ethereum) ecdsacmd.ModuleCommand.SetConfig(&clientConfig.Ethereum) tbtccmd.ModuleCommand.SetConfig(&clientConfig.Ethereum) thresholdcmd.ModuleCommand.SetConfig(&clientConfig.Ethereum) }, }
EthereumCommand contains the definition of the ethereum command-line subcommand and its own subcommands.
var MaintainerCliCommand = &cobra.Command{ Use: "maintainer-cli", Short: "Maintainer CLI Tools", Long: "The tool exposes commands for tools associated with maintainers.", TraverseChildren: true, PersistentPreRun: func(cmd *cobra.Command, args []string) { if err := clientConfig.ReadConfig( configFilePath, cmd.Flags(), config.General, config.Ethereum, config.BitcoinElectrum, ); err != nil { logger.Fatalf("error reading config: %v", err) } }, }
MaintainerCliCommand contains the definition of tools associated with maintainers module.
var MaintainerCommand = &cobra.Command{ Use: "maintainer", Short: `(experimental) Starts maintainers`, Long: `(experimental) The maintainer command starts maintainers`, PreRun: func(cmd *cobra.Command, args []string) { if err := clientConfig.ReadConfig( configFilePath, cmd.Flags(), config.MaintainerCategories..., ); err != nil { logger.Fatalf("error reading config: %v", err) } }, RunE: maintainers, }
MaintainerCommand contains the definition of the maintainer command-line subcommand.
var PingCommand = &cobra.Command{ Use: "ping [multiaddr]...", Short: `bidirectional send between two peers to test the network`, Long: pingDescription, DisableFlagsInUseLine: true, RunE: pingRequest, }
PingCommand contains the definition of the ping command-line subcommand.
var RootCmd = &cobra.Command{ Use: path.Base(os.Args[0]), Short: "CLI for The Keep Network", Long: "Command line interface (CLI) for running a Keep provider", TraverseChildren: true, }
RootCmd contains the definition of the root command-line command.
var StartCommand = &cobra.Command{ Use: "start", Short: "Starts the Keep Client", Long: "Starts the Keep Client in the foreground", PreRun: func(cmd *cobra.Command, args []string) { if err := clientConfig.ReadConfig(configFilePath, cmd.Flags(), config.StartCmdCategories...); err != nil { logger.Fatalf("error reading config: %v", err) } }, Run: func(cmd *cobra.Command, args []string) { if err := start(cmd); err != nil { logger.Fatal(err) } }, }
StartCommand contains the definition of the start command-line subcommand.
Functions ¶
func Initialize ¶
Initialize initializes the root command and returns it.
Types ¶
type PingMessage ¶
PingMessage is a network message sent between bootstrap peer and non-bootstrap peer in order to test the connection.
func (*PingMessage) Marshal ¶
func (pm *PingMessage) Marshal() ([]byte, error)
Marshal converts this PingMessage to a byte array suitable for network communication.
func (*PingMessage) Type ¶
func (pm *PingMessage) Type() string
Type returns a string type of the `PingMessage` so that it conforms to `net.Message` interface.
func (*PingMessage) Unmarshal ¶
func (pm *PingMessage) Unmarshal(bytes []byte) error
Unmarshal converts a byte array produced by Marshal to a PingMessage.
type PongMessage ¶
PongMessage is a network message sent between bootstrap peer and non-bootstrap peer in order to test the connection.
func (*PongMessage) Marshal ¶
func (pm *PongMessage) Marshal() ([]byte, error)
Marshal converts this PongMessage to a byte array suitable for network communication.
func (*PongMessage) Type ¶
func (pm *PongMessage) Type() string
Type returns a string type of the `PongMessage` so that it conforms to `net.Message` interface.
func (*PongMessage) Unmarshal ¶
func (pm *PongMessage) Unmarshal(bytes []byte) error
Unmarshal converts a byte array produced by Marshal to a PongMessage.