sync

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ByRangeCmd

type ByRangeCmd struct {
	*base.Base

	Blocks bdb.DB
	Chain  chain.FullChain

	PeerID         flags.PeerIDFlag      `ask:"--peer" help:"Peers to make blocks-by-range request to."`
	StartSlot      beacon.Slot           `ask:"--start" help:"Start slot of request"`
	Count          uint64                `ask:"--count" help:"Count of blocks of request"`
	Step           uint64                `ask:"--step" help:"Step between slots of blocks of request"`
	Timeout        time.Duration         `ask:"--timeout" help:"Timeout for full request and response. 0 to disable"`
	ProcessTimeout time.Duration         `ask:"--process-timeout" help:"Timeout for parallel processing of blocks. 0 to disable."`
	Compression    flags.CompressionFlag `ask:"--compression" help:"Compression. 'none' to disable, 'snappy' for streaming-snappy"`
	Store          bool                  `ask:"--store" help:"If the blocks should be stored in the blocks DB"`
	Process        bool                  `ask:"--process" help:"If the blocks should be added to the current chain view, ignored otherwise"`
}

func (*ByRangeCmd) Default

func (c *ByRangeCmd) Default()

func (*ByRangeCmd) Help

func (c *ByRangeCmd) Help() string

func (*ByRangeCmd) Run

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

type ByRootCmd

type ByRootCmd struct {
	*base.Base

	Blocks bdb.DB
	Chain  chain.FullChain

	PeerID flags.PeerIDFlag `ask:"--peer" help:"Peers to make blocks-by-root request to."`

	Roots []beacon.Root `ask:"--roots" help:"Block roots to request"`

	Timeout        time.Duration         `ask:"--timeout" help:"Timeout for full request and response. 0 to disable"`
	ProcessTimeout time.Duration         `ask:"--process-timeout" help:"Timeout for parallel processing of blocks. 0 to disable."`
	Compression    flags.CompressionFlag `ask:"--compression" help:"Compression. 'none' to disable, 'snappy' for streaming-snappy"`
	Store          bool                  `ask:"--store" help:"If the blocks should be stored in the blocks DB"`
	Process        bool                  `ask:"--process" help:"If the blocks should be added to the current chain view, ignored otherwise"`
}

func (*ByRootCmd) Default

func (c *ByRootCmd) Default()

func (*ByRootCmd) Help

func (c *ByRootCmd) Help() string

func (*ByRootCmd) Run

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

type SyncCmd

type SyncCmd struct {
	*base.Base
	Chain  chain.FullChain
	Blocks bdb.DB
}

func (*SyncCmd) Cmd

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

func (*SyncCmd) Help

func (c *SyncCmd) Help() string

func (*SyncCmd) Routes

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

type SyncFn

type SyncFn func(blocksCh chan<- *beacon.SignedBeaconBlock) error

Jump to

Keyboard shortcuts

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