cmd

package
v1.3.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2020 License: MIT Imports: 31 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EthereumCommand cli.Command

EthereumCommand contains the definition of the ethereum command-line subcommand and its own subcommands.

View Source
var PingCommand cli.Command

PingCommand contains the definition of the ping command-line subcommand.

View Source
var RelayCommand cli.Command

RelayCommand contains the definition of the relay command-line subcommand and its own subcommands.

View Source
var (
	StartCommand cli.Command
)

StartCommand contains the definition of the start command-line subcommand.

Functions

func Start

func Start(c *cli.Context) error

Start starts a node; if it's not a bootstrap node it will get the Node.URLs from the config file

Types

type PingMessage

type PingMessage struct {
	Sender  string
	Payload string
}

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

type PongMessage struct {
	Sender  string
	Payload string
}

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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