indexer

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2020 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const ShardsTruncationLeeway = 5

Variables

View Source
var CompletedError = fmt.Errorf("batch completed")

Functions

This section is empty.

Types

type Indexer

type Indexer struct {
	*shutter.Shutter

	StartBlockNum uint64
	StopBlockNum  uint64

	Verbose bool
	// contains filtered or unexported fields
}

func NewIndexer

func NewIndexer(
	indexesStore dstore.Store,
	blocksStore dstore.Store,
	blockstreamAddr string,
	blockMapper search.BlockMapper,
	writePath string,
	shardSize uint64,
	httpListenAddr string,
	grpcListenAddr string,

) *Indexer

func (*Indexer) Bootstrap

func (i *Indexer) Bootstrap(startBlockNum uint64) error

func (*Indexer) BuildBatchPipeline

func (i *Indexer) BuildBatchPipeline(targetStartBlockNum, fileSourceStartBlockNum uint64, previousIrreversibleID string, enableUpload bool, deleteAfterUpload bool)

func (*Indexer) BuildLivePipeline

func (i *Indexer) BuildLivePipeline(targetStartBlockNum, fileSourceStartBlockNum uint64, previousIrreversibleID string, enableUpload bool, deleteAfterUpload bool)

func (*Indexer) Launch

func (i *Indexer) Launch()

func (*Indexer) NextBaseBlockAfter

func (i *Indexer) NextBaseBlockAfter(startBlockNum uint64) (nextStartBlockNum uint64)

type Pipeline

type Pipeline struct {
	// contains filtered or unexported fields
}

func (*Pipeline) Bootstrap

func (p *Pipeline) Bootstrap(startBlockNum uint64) error

func (*Pipeline) ProcessBlock

func (pipe *Pipeline) ProcessBlock(blk *bstream.Block, objWrap interface{}) error

func (*Pipeline) SetCatchUpMode

func (pipe *Pipeline) SetCatchUpMode()

func (*Pipeline) Upload

func (p *Pipeline) Upload(baseIndex uint64, indexPath string) (err error)

func (*Pipeline) WaitOnUploads

func (p *Pipeline) WaitOnUploads()

type Truncator

type Truncator struct {
	// contains filtered or unexported fields
}

func NewTruncator

func NewTruncator(indexer *Indexer, blockCount uint64) *Truncator

func (*Truncator) Launch

func (t *Truncator) Launch()

Jump to

Keyboard shortcuts

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