peer

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HostWithIDService added in v0.2.4

type HostWithIDService interface {
	IDService() *identify.IDService
}

type PeerAddCmd added in v0.2.1

type PeerAddCmd struct {
	*base.Base
	Store  track.ExtendedPeerstore
	PeerID flags.PeerIDFlag       `ask:"--peer-id" help:"If not present in the address, manually specify the peer ID."`
	TTL    time.Duration          `ask:"--ttl" help:"How long the address should be kept around."`
	Addr   flags.FlexibleAddrFlag `ask:"<addr>" help:"ENR, enode or multi address to add."`
}

func (*PeerAddCmd) Default added in v0.2.1

func (c *PeerAddCmd) Default()

func (*PeerAddCmd) Help added in v0.2.1

func (c *PeerAddCmd) Help() string

func (*PeerAddCmd) Run added in v0.2.1

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

type PeerAddrsCmd

type PeerAddrsCmd struct {
	*base.Base
	PeerID flags.PeerIDFlag `ask:"[peer-id]" help:"The peer to view addresses of, or local peer if omitted."`
}

func (*PeerAddrsCmd) Help

func (c *PeerAddrsCmd) Help() string

func (*PeerAddrsCmd) Run

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

type PeerCmd

func (*PeerCmd) Cmd

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

func (*PeerCmd) Help

func (c *PeerCmd) Help() string

func (*PeerCmd) Routes

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

type PeerConnectAllCmd added in v0.3.3

type PeerConnectAllCmd struct {
	*base.Base
	Store      track.ExtendedPeerstore
	Timeout    time.Duration `ask:"--timeout" help:"connection timeout, 0 to disable"`
	Rescan     time.Duration `ask:"--rescan" help:"rescan the peerscore for new peers to connect with this given interval"`
	MaxRetries uint64        `ask:"--max-retries" help:"how many connection attempts until the peer is banned"`
	Workers    uint64        `ask:"--workers" help:"how many parallel routines should be attempting connections"`
	MaxPeers   uint64        `ask:"--max-peers" help:"max amount of peers, pause auto-connecting when above this"`

	FilterDigest beacon.ForkDigest `` /* 138-byte string literal not displayed */
	Filtering    bool              `changed:"filter-digest"`
}

func (*PeerConnectAllCmd) Default added in v0.3.3

func (c *PeerConnectAllCmd) Default()

func (*PeerConnectAllCmd) Help added in v0.3.3

func (c *PeerConnectAllCmd) Help() string

func (*PeerConnectAllCmd) Run added in v0.3.3

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

type PeerConnectCmd

type PeerConnectCmd struct {
	*base.Base
	Store   track.ExtendedPeerstore
	Timeout time.Duration          `ask:"--timeout" help:"connection timeout, 0 to disable"`
	Addr    flags.FlexibleAddrFlag `ask:"<addr>" help:"ENR, enode or multi address to connect to"`
	Tag     string                 `ask:"[tag]" help:"Optionally tag the peer upon connection, e.g. tag 'bootnode'"`
}

func (*PeerConnectCmd) Default added in v0.2.3

func (c *PeerConnectCmd) Default()

func (*PeerConnectCmd) Help

func (c *PeerConnectCmd) Help() string

func (*PeerConnectCmd) Run

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

type PeerDisconnectCmd

type PeerDisconnectCmd struct {
	*base.Base
	PeerID flags.PeerIDFlag `ask:"<peer-id>" help:"The peer to close all connections of"`
}

func (*PeerDisconnectCmd) Help

func (c *PeerDisconnectCmd) Help() string

func (*PeerDisconnectCmd) Run

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

type PeerIdentifyCmd added in v0.2.4

type PeerIdentifyCmd struct {
	*base.Base
	Timeout time.Duration    `ask:"--timeout" help:"connection timeout, 0 to disable"`
	PeerID  flags.PeerIDFlag `ask:"<peer-ID>" help:"peer ID"`
}

func (*PeerIdentifyCmd) Default added in v0.2.4

func (c *PeerIdentifyCmd) Default()

func (*PeerIdentifyCmd) Help added in v0.2.4

func (c *PeerIdentifyCmd) Help() string

func (*PeerIdentifyCmd) Run added in v0.2.4

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

type PeerInfoCmd

type PeerInfoCmd struct {
	*base.Base
	Store track.ExtendedPeerstore

	PeerID flags.PeerIDFlag `ask:"<peer-ID>" help:"peer ID"`
}

func (*PeerInfoCmd) Help

func (c *PeerInfoCmd) Help() string

func (*PeerInfoCmd) Run

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

type PeerListCmd

type PeerListCmd struct {
	*base.Base
	Store track.ExtendedPeerstore

	Which   string `ask:"[which]" help:"Which peers to list, possible values: 'all', 'connected'."`
	Details bool   `ask:"--details" help:"List detailed data of each peer"`
}

func (*PeerListCmd) Default

func (c *PeerListCmd) Default()

func (*PeerListCmd) Help

func (c *PeerListCmd) Help() string

func (*PeerListCmd) Run

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

type PeerProtectCmd

type PeerProtectCmd struct {
	*base.Base
	PeerID flags.PeerIDFlag `ask:"<peer-id>" help:"The peer to protect with a tag"`
	Tag    string           `ask:"<tag>" help:"Tag to give to the peer"`
}

func (*PeerProtectCmd) Help

func (c *PeerProtectCmd) Help() string

func (*PeerProtectCmd) Run

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

type PeerTrimCmd

type PeerTrimCmd struct {
	*base.Base
	Timeout time.Duration `ask:"[timeout]" help:"Timeout for trimming."`
}

func (*PeerTrimCmd) Default

func (c *PeerTrimCmd) Default()

func (*PeerTrimCmd) Help

func (c *PeerTrimCmd) Help() string

func (*PeerTrimCmd) Run

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

type PeerUnprotectCmd

type PeerUnprotectCmd struct {
	*base.Base
	PeerID flags.PeerIDFlag `ask:"<peer-id>" help:"The peer to un-protect with a tag"`
	Tag    string           `ask:"<tag>" help:"Tag to remove from the peer"`
}

func (*PeerUnprotectCmd) Help

func (c *PeerUnprotectCmd) Help() string

func (*PeerUnprotectCmd) Run

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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