go-ethereum/command/peers.go
Ferran Borreguero 58702220ac Add peers module
2021-10-26 09:35:46 +02:00

43 lines
833 B
Go

package main
import (
"github.com/mitchellh/cli"
)
// PeersCommand is the command to group the peers commands
type PeersCommand struct {
UI cli.Ui
}
// Help implements the cli.Command interface
func (c *PeersCommand) Help() string {
return `Usage: bor peers <subcommand>
This command groups actions to interact with peers.
List the connected peers:
$ bor account new
Add a new peer by enode:
$ bor account import
Remove a connected peer by enode:
$ bor peers remove <enode>
Display information about a peer:
$ bor peers status <peer id>`
}
// Synopsis implements the cli.Command interface
func (c *PeersCommand) Synopsis() string {
return "Interact with peers"
}
// Run implements the cli.Command interface
func (c *PeersCommand) Run(args []string) int {
return cli.RunResultHelp
}