dv5

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoDv5Err = errors.New("Must start discv5 first. Try 'dv5 run'")

Functions

This section is empty.

Types

type Dv5Cmd

type Dv5Cmd struct {
	*base.Base
	*Dv5State

	CurrentPeerstore track.DynamicPeerstore

	dv5.Dv5Settings
}

func (*Dv5Cmd) Cmd

func (c *Dv5Cmd) Cmd(route string) (cmd interface{}, err error)

func (*Dv5Cmd) Help

func (c *Dv5Cmd) Help() string

func (*Dv5Cmd) Routes

func (c *Dv5Cmd) Routes() []string

type Dv5LookupCmd

type Dv5LookupCmd struct {
	*base.Base
	*Dv5State
	Target flags.NodeIDFlexibleFlag `ask:"<target>" help:"Target ENR/enode/node-id"`
}

func (*Dv5LookupCmd) Help

func (c *Dv5LookupCmd) Help() string

func (*Dv5LookupCmd) Run

func (c *Dv5LookupCmd) Run(ctx context.Context, args ...string) error

type Dv5PingCmd

type Dv5PingCmd struct {
	*base.Base
	*Dv5State
	Target flags.EnrOrEnodeFlag `ask:"<target>" help:"Target ENR/enode"`
}

func (*Dv5PingCmd) Help

func (c *Dv5PingCmd) Help() string

func (*Dv5PingCmd) Run

func (c *Dv5PingCmd) Run(ctx context.Context, args ...string) error

type Dv5RandomCmd

type Dv5RandomCmd struct {
	*base.Base
	*Dv5State
	HandleENR `ask:"."`     // embed ENR handling command options
	Stepwise  bool          `ask:"--stepwise" help:"Step through each findnode action, instead of running automatically"`
	Interval  time.Duration `ask:"--interval" help:"Wait duration between findnode iterations, when not stepwise."`
}

func (*Dv5RandomCmd) Default

func (c *Dv5RandomCmd) Default()

func (*Dv5RandomCmd) Help

func (c *Dv5RandomCmd) Help() string

func (*Dv5RandomCmd) Run

func (c *Dv5RandomCmd) Run(ctx context.Context, args ...string) error

type Dv5RequestCmd

type Dv5RequestCmd struct {
	*base.Base
	*Dv5State
	Target flags.EnrOrEnodeFlag `ask:"<target>" help:"Target ENR/enode"`
}

func (*Dv5RequestCmd) Help

func (c *Dv5RequestCmd) Help() string

func (*Dv5RequestCmd) Run

func (c *Dv5RequestCmd) Run(ctx context.Context, args ...string) error

type Dv5ResolveCmd

type Dv5ResolveCmd struct {
	*base.Base
	*Dv5State
	Target flags.EnrOrEnodeFlag `ask:"<target>" help:"Target ENR/enode"`
}

func (*Dv5ResolveCmd) Help

func (c *Dv5ResolveCmd) Help() string

func (*Dv5ResolveCmd) Run

func (c *Dv5ResolveCmd) Run(ctx context.Context, args ...string) error

type Dv5RunCmd

type Dv5RunCmd struct {
	*base.Base
	*Dv5State
	dv5.Dv5Settings
	ListenIP  net.IP   `ask:"--ip" help:"Optional listen IP. Will try 0.0.0.0 otherwise."`
	ListenUDP uint16   `ask:"--udp" help:"Optional UDP port. Will try ENR port otherwise."`
	Bootnodes []string `ask:"[bootnodes]" help:"Bootnodes for dv5"`
}

func (*Dv5RunCmd) Help

func (c *Dv5RunCmd) Help() string

func (*Dv5RunCmd) Run

func (c *Dv5RunCmd) Run(ctx context.Context, args ...string) error

type Dv5SelfCmd

type Dv5SelfCmd struct {
	*base.Base
	*Dv5State
}

func (*Dv5SelfCmd) Help

func (c *Dv5SelfCmd) Help() string

func (*Dv5SelfCmd) Run

func (c *Dv5SelfCmd) Run(ctx context.Context, args ...string) error

type Dv5State

type Dv5State struct {
	Dv5Node dv5.Discv5
}

type HandleENR

type HandleENR struct {
	Store track.DynamicPeerstore

	Add          bool              `ask:"--add" help:"Add the discovered nodes to the peerstore (requires peerstore to use)"`
	FilterDigest beacon.ForkDigest `ask:"--filter-digest" help:"Only add peers with the given digest to the peerstore"`
	TTL          time.Duration     `ask:"--ttl" help:"When adding the node, apply this TTL"`
	Filtering    bool              `changed:"filter-digest"`
}

Jump to

Keyboard shortcuts

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