enr

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: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnrCmd

type EnrCmd struct {
	*base.Base
	Lazy *LazyEnrState
	base.PrivSettings
	base.WithHostPriv
}

func (*EnrCmd) Cmd

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

func (*EnrCmd) Help

func (c *EnrCmd) Help() string

func (*EnrCmd) Routes

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

type EnrGenKeyCmd

type EnrGenKeyCmd struct {
	*base.Base
}

func (*EnrGenKeyCmd) Help

func (c *EnrGenKeyCmd) Help() string

func (*EnrGenKeyCmd) Run

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

type EnrMakeCmd

type EnrMakeCmd struct {
	*base.Base
	Lazy *LazyEnrState
	base.WithHostPriv
	base.PrivSettings

	FromHost bool `ask:"--from-host" help:"If IP, TCP and UDP should copy the libp2p host settings, if not present in the ENR already"`

	RmIP        bool   `ask:"--rm-ip"`
	IP          net.IP `ask:"--ip" help:"IP address dv4. Currrent ENR IP if empty."`
	StaticIP    net.IP `ask:"--static-ip" help:"Set a static IP in the ENR."`
	FallbackIP  net.IP `ask:"--fallback-ip" help:"Set a fallback IP, used when no public IP is known, until it can be determined from traffic."`
	FallbackUDP uint16 `` /* 128-byte string literal not displayed */
	TCP         uint16 `ask:"--tcp" help:"TCP port. Current ENR port if 0"`
	UDP         uint16 `ask:"--udp" help:"UDP port. Current ENR port if 0"`

	GenPriv bool                 `ask:"--gen-priv" help:"If no private key is known, and none is provided, then generate one"`
	Priv    flags.P2pPrivKeyFlag `` /* 150-byte string literal not displayed */

	Attnets         beacon.AttnetBits `ask:"--attnets" help:"Attnet bitfield, as bytes."`
	ForkDigest      beacon.ForkDigest `ask:"--fork-digest" help:"Eth2 fork digest"`
	NextForkVersion beacon.Version    `ask:"--next-fork-version" help:"Eth2 next fork version"`
	NextForkEpoch   beacon.Epoch      `ask:"--next-fork-epoch" help:"Eth2 next fork epoch"`

	IPChanged          bool `changed:"ip"`
	StaticIPChanged    bool `changed:"static-ip"`
	FallbackIPChanged  bool `changed:"fallback-ip"`
	FallbackUDPChanged bool `changed:"fallback-udp"`
	TCPChanged         bool `changed:"tcp"`
	UDPChanged         bool `changed:"udp"`

	AttnetsChanged         bool `changed:"attnets"`
	ForkDigestChanged      bool `changed:"fork-digest"`
	NextForkVersionChanged bool `changed:"next-fork-version"`
	NextForkEpochChanged   bool `changed:"next-fork-epoch"`
}

func (*EnrMakeCmd) Default added in v0.2.1

func (c *EnrMakeCmd) Default()

func (*EnrMakeCmd) Help

func (c *EnrMakeCmd) Help() string

func (*EnrMakeCmd) Run

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

type EnrViewCmd

type EnrViewCmd struct {
	*base.Base
	Lazy *LazyEnrState

	KvMode bool          `ask:"--kv" help:"Print the full set of Key-Value pairs"`
	Enr    flags.EnrFlag `ask:"[enr]" help:"The ENR to view, url-base64 (RFC 4648). With optional 'enr:' or 'enr://' prefix."`
}

func (*EnrViewCmd) Help

func (c *EnrViewCmd) Help() string

func (*EnrViewCmd) Run

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

type LazyEnrState added in v0.2.1

type LazyEnrState struct {
	Current *enrstate.EnrState
}

Jump to

Keyboard shortcuts

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