indexer

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	AccountAggCreatorTaskName   = "AccountAggCreator"
	ValidatorAggCreatorTaskName = "ValidatorAggCreator"
)
View Source
const (
	BlockFetcherTaskName        = "BlockFetcher"
	StateFetcherTaskName        = "StateFetcher"
	StakingStateFetcherTaskName = "StakingStateFetcher"
	ValidatorFetcherTaskName    = "ValidatorFetcher"
	TransactionFetcherTaskName  = "TransactionFetcher"
)
View Source
const (
	BlockParserTaskName      = "BlockParser"
	ValidatorsParserTaskName = "ValidatorsParser"
)
View Source
const (
	SyncerPersistorTaskName       = "SyncerPersistor"
	BlockSeqPersistorTaskName     = "BlockSeqPersistor"
	ValidatorSeqPersistorTaskName = "ValidatorSeqPersistor"
	ValidatorAggPersistorTaskName = "ValidatorAggPersistor"
)
View Source
const (
	BlockSeqCreatorTaskName               = "BlockSeqCreator"
	ValidatorSeqCreatorTaskName           = "ValidatorSeqCreator"
	TransactionSeqCreatorTaskName         = "TransactionSeqCreator"
	StakingSeqCreatorTaskName             = "StakingSeqCreator"
	DelegationSeqCreatorTaskName          = "DelegationSeqCreator"
	DebondingDelegationSeqCreatorTaskName = "DebondingDelegationSeqCreator"
)
View Source
const (
	TargetIndexBlockSequences = iota + 1
	TargetIndexValidatorSequences
	TargetIndexValidatorAggregates
)
View Source
const (
	CtxReport = "context_report"
)
View Source
const (
	HeightMetaRetrieverTaskName = "HeightMetaRetriever"
)
View Source
const (
	MainSyncerTaskName = "MainSyncer"
)

Variables

View Source
var (
	ErrNothingToProcess = errors.New("nothing to process")
)

Functions

func BlockToSequence

func BlockToSequence(syncable *model.Syncable, rawBlock *blockpb.Block, blockParsedData ParsedBlockData) (*model.BlockSeq, error)

func NewBackfillSource

func NewBackfillSource(cfg *config.Config, db *store.Store, client *client.Client, sourceCfg *BackfillSourceConfig) (*backfillSource, error)

func NewBlockFetcherTask

func NewBlockFetcherTask(client *client.Client) pipeline.Task

func NewBlockParserTask

func NewBlockParserTask() *blockParserTask

func NewBlockSeqCreatorTask

func NewBlockSeqCreatorTask(db *store.Store) *blockSeqCreatorTask

func NewBlockSeqPersistorTask

func NewBlockSeqPersistorTask(db *store.Store) pipeline.Task

func NewHeightMetaRetrieverTask

func NewHeightMetaRetrieverTask(c *client.Client) pipeline.Task

func NewIndexSource

func NewIndexSource(cfg *config.Config, db *store.Store, client *client.Client, sourceCfg *IndexSourceConfig) (*indexSource, error)

func NewLogger

func NewLogger() pipeline.Logger

func NewMainSyncerTask

func NewMainSyncerTask(db *store.Store) pipeline.Task

func NewPayloadFactory

func NewPayloadFactory() *payloadFactory

func NewPipeline

func NewPipeline(cfg *config.Config, db *store.Store, client *client.Client) (*indexingPipeline, error)

func NewSink

func NewSink(db *store.Store, versionNumber int64) *sink

func NewSyncerPersistorTask

func NewSyncerPersistorTask(db *store.Store) pipeline.Task

func NewTargetsReader

func NewTargetsReader(file string) (*targetsReader, error)

NewTargetsReader constructor for targetsReader

Types

type BackfillConfig

type BackfillConfig struct {
	Parallel  bool
	Force     bool
	TargetIds []int64
}

type BackfillSourceConfig

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

type BlockFetcherTask

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

func (*BlockFetcherTask) GetName

func (t *BlockFetcherTask) GetName() string

func (*BlockFetcherTask) Run

type HeightMeta

type HeightMeta struct {
	Height        int64
	Time          types.Time
	SpecVersion   string
	ChainUID      string
	Session       int64
	Era           int64
	LastInSession bool
	LastInEra     bool
}

type IndexSourceConfig

type IndexSourceConfig struct {
	BatchSize   int64
	StartHeight int64
}

type ParsedBlockData

type ParsedBlockData struct {
	ExtrinsicsCount         int64
	UnsignedExtrinsicsCount int64
	SignedExtrinsicsCount   int64
}

type RunConfig

type RunConfig struct {
	Height          int64
	DesiredTargetID int64
	Dry             bool
}

type StartConfig

type StartConfig struct {
	BatchSize   int64
	StartHeight int64
}

Jump to

Keyboard shortcuts

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