cli

package
v0.0.0-...-18d41d4 Latest Latest
Warning

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

Go to latest
Published: May 23, 2022 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Init = cmd.Sub{
	Name:  "init",
	Alias: "i",
	Short: "Initialize the decentralized node configuration file.",
	Args:  &InitArgs{},
	Run:   InitRun,
}

Init creates a configuration for a Discovery P2P Interface.

View Source
var (
	// RevLookup allow quick lookups of an incoming stream
	// for security before accepting or responding to any data.
	RevLookup map[string]string
)
View Source
var Root *cmd.Root

Root is the main command.

View Source
var Up = cmd.Sub{
	Name:  "up",
	Alias: "up",
	Short: "Create and Bring Up a Discovery P2P Interface.",
	Args:  &UpArgs{},
	Flags: &UpFlags{},
	Run:   UpRun,
}

Up creates and brings up a Discovery P2P Interface.

Functions

func InitRun

func InitRun(r *cmd.Root, c *cmd.Sub)

InitRun handles the execution of the init command.

func UpRun

func UpRun(r *cmd.Root, c *cmd.Sub)

UpRun handles the execution of the up command.

Types

type DataMessage

type DataMessage struct {
	Message    string
	SenderID   string
	SenderNick string
}

ChatMessage gets converted to/from JSON and sent in the body of pubsub messages.

type GlobalFlags

type GlobalFlags struct {
	Config string `short:"c" long:"config" desc:"Specify a custom config path."`
}

GlobalFlags contains the flags for commands.

type InitArgs

type InitArgs struct {
	InterfaceName string
}

InitArgs handles the specific arguments for the init command.

type UpArgs

type UpArgs struct {
	InterfaceName string
}

UpArgs handles the specific arguments for the up command.

type UpFlags

type UpFlags struct {
	Pub bool `short:"p" long:"pub" desc:"pub"`
}

UpFlags handles the specific flags for the up command.

Jump to

Keyboard shortcuts

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