metadata

package
v0.2.4-0...-f8342f3 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PeerMetadataCmd

type PeerMetadataCmd struct {
	*base.Base
	*PeerMetadataState
	Store track.ExtendedPeerstore
}

func (*PeerMetadataCmd) Cmd

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

func (*PeerMetadataCmd) Help

func (c *PeerMetadataCmd) Help() string

func (*PeerMetadataCmd) Routes

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

type PeerMetadataFollowCmd

type PeerMetadataFollowCmd struct {
	*base.Base
	*PeerMetadataState
	Following bool `ask:"[following]" help:"If the metadata should automatically follow the latest information"`
}

func (*PeerMetadataFollowCmd) Default

func (c *PeerMetadataFollowCmd) Default()

func (*PeerMetadataFollowCmd) Help

func (c *PeerMetadataFollowCmd) Help() string

func (*PeerMetadataFollowCmd) Run

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

type PeerMetadataGetCmd

type PeerMetadataGetCmd struct {
	*base.Base
	*PeerMetadataState
}

func (*PeerMetadataGetCmd) Help

func (c *PeerMetadataGetCmd) Help() string

func (*PeerMetadataGetCmd) Run

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

type PeerMetadataPingCmd

type PeerMetadataPingCmd struct {
	*base.Base
	*PeerMetadataState
	Store         track.ExtendedPeerstore
	Timeout       time.Duration         `ask:"--timeout" help:"request timeout for ping, 0 to disable"`
	Compression   flags.CompressionFlag `ask:"--compression" help:"Compression. 'none' to disable, 'snappy' for streaming-snappy"`
	Update        bool                  `ask:"--update" help:"If the seq nr pong is higher than known, request metadata"`
	ForceUpdate   bool                  `ask:"--force-update" help:"Force a metadata request, even if the ping results in an already known pong seq nr"`
	UpdateTimeout time.Duration         `ask:"--update-timeout" help:"If updating, use this timeout for the update request, 0 to disable."`
	PeerID        flags.PeerIDFlag      `ask:"<peer-id>" help:"Peer to fetch metadata from."`
	MaxTries      uint64                `ask:"--max-tries" help:"How many times an update should be attempted after learning about a pong"`
}

func (*PeerMetadataPingCmd) Default

func (c *PeerMetadataPingCmd) Default()

func (*PeerMetadataPingCmd) Help

func (c *PeerMetadataPingCmd) Help() string

func (*PeerMetadataPingCmd) Run

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

type PeerMetadataPollCmd

type PeerMetadataPollCmd struct {
	*base.Base
	*PeerMetadataState
	Store         track.ExtendedPeerstore
	Timeout       time.Duration         `ask:"--timeout" help:"request timeout for ping, 0 to disable."`
	Interval      time.Duration         `ask:"--interval" help:"interval to send pings to peers on, applied as timeout to a round of work"`
	Update        bool                  `ask:"--update" help:"If the seq nr pong is higher than known, request metadata"`
	ForceUpdate   bool                  `ask:"--force-update" help:"Force a metadata request, even if the ping results in an already known pong seq nr"`
	UpdateTimeout time.Duration         `ask:"--update-timeout" help:"If updating, use this timeout for the update request, 0 to disable."`
	MaxTries      uint64                `ask:"--max-tries" help:"How many times an update should be attempted after learning about a pong"`
	Compression   flags.CompressionFlag `ask:"--compression" help:"Compression. 'none' to disable, 'snappy' for streaming-snappy"`
}

func (*PeerMetadataPollCmd) Default

func (c *PeerMetadataPollCmd) Default()

func (*PeerMetadataPollCmd) Help

func (c *PeerMetadataPollCmd) Help() string

func (*PeerMetadataPollCmd) Run

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

type PeerMetadataPongCmd

type PeerMetadataPongCmd struct {
	*base.Base
	*PeerMetadataState
	Book          track.MetadataBook
	Timeout       time.Duration         `` /* 127-byte string literal not displayed */
	Compression   flags.CompressionFlag `ask:"--compression" help:"Compression. 'none' to disable, 'snappy' for streaming-snappy"`
	Update        bool                  `ask:"--update" help:"If the seq nr ping is higher than known, request metadata"`
	ForceUpdate   bool                  `ask:"--force-update" help:"Force a metadata request, even if the ping is an already past seq nr"`
	UpdateTimeout time.Duration         `` /* 139-byte string literal not displayed */
	MaxTries      uint64                `ask:"--max-tries" help:"How many times an update should be attempted after learning about a ping"`
}

func (*PeerMetadataPongCmd) Default

func (c *PeerMetadataPongCmd) Default()

func (*PeerMetadataPongCmd) Help

func (c *PeerMetadataPongCmd) Help() string

func (*PeerMetadataPongCmd) Run

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

type PeerMetadataReqCmd

type PeerMetadataReqCmd struct {
	*base.Base
	*PeerMetadataState
	Book        track.MetadataBook
	Timeout     time.Duration         `ask:"--timeout" help:"request timeout, 0 to disable"`
	Compression flags.CompressionFlag `ask:"--compression" help:"Compression. 'none' to disable, 'snappy' for streaming-snappy"`
	PeerID      flags.PeerIDFlag      `ask:"<peer-id>" help:"Peer to fetch metadata from."`
}

func (*PeerMetadataReqCmd) Default

func (c *PeerMetadataReqCmd) Default()

func (*PeerMetadataReqCmd) Help

func (c *PeerMetadataReqCmd) Help() string

func (*PeerMetadataReqCmd) Run

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

type PeerMetadataServeCmd

type PeerMetadataServeCmd struct {
	*base.Base
	*PeerMetadataState
	Timeout     time.Duration         `` /* 127-byte string literal not displayed */
	Compression flags.CompressionFlag `ask:"--compression" help:"Compression. 'none' to disable, 'snappy' for streaming-snappy"`
}

func (*PeerMetadataServeCmd) Default

func (c *PeerMetadataServeCmd) Default()

func (*PeerMetadataServeCmd) Help

func (c *PeerMetadataServeCmd) Help() string

func (*PeerMetadataServeCmd) Run

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

type PeerMetadataSetCmd

type PeerMetadataSetCmd struct {
	*base.Base
	*PeerMetadataState
	SeqNumber beacon.SeqNr      `ask:"--seq-number" help:"Seq Number of metadata"`
	Attnets   beacon.AttnetBits `ask:"--attnets" help:"Attestation nets bitfield as bytes"`
	Merge     bool              `ask:"--merge" help:"If true, only apply non-zero options to state"`
}

func (*PeerMetadataSetCmd) Default

func (c *PeerMetadataSetCmd) Default()

func (*PeerMetadataSetCmd) Help

func (c *PeerMetadataSetCmd) Help() string

func (*PeerMetadataSetCmd) Run

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

type PeerMetadataState

type PeerMetadataState struct {
	Following bool
	Local     beacon.MetaData
}

Jump to

Keyboard shortcuts

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