indexer

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2020 License: Apache-2.0 Imports: 20 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 (
	ErrAccountAggNotValid = errors.New("account aggregator not valid")
)
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 DebondingDelegationToSequence

func DebondingDelegationToSequence(syncable *model.Syncable, rawState *statepb.State) ([]model.DebondingDelegationSeq, error)

func DelegationToSequence

func DelegationToSequence(syncable *model.Syncable, rawState *statepb.State) ([]model.DelegationSeq, error)

func NewAccountAggCreatorTask

func NewAccountAggCreatorTask(db *store.Store) *accountAggCreatorTask

func NewBackfillSource added in v0.4.2

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 added in v0.4.0

func NewBlockParserTask() *blockParserTask

func NewBlockSeqCreatorTask

func NewBlockSeqCreatorTask(db *store.Store) *blockSeqCreatorTask

func NewBlockSeqPersistorTask added in v0.4.2

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

func NewDebondingDelegationsSeqCreatorTask

func NewDebondingDelegationsSeqCreatorTask(db *store.Store) *debondingDelegationSeqCreatorTask

func NewDelegationsSeqCreatorTask

func NewDelegationsSeqCreatorTask(db *store.Store) *delegationSeqCreatorTask

func NewHeightMetaRetrieverTask

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

func NewIndexSource added in v0.4.2

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

func NewLogger added in v0.4.2

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 NewStakingSeqCreatorTask

func NewStakingSeqCreatorTask(db *store.Store) *stakingSeqCreatorTask

func NewStakingStateFetcherTask added in v0.4.0

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

func NewStateFetcherTask

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

func NewSyncerPersistorTask added in v0.4.2

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

func NewTargetsReader added in v0.4.2

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

NewTargetsReader constructor for targetsReader

func NewTransactionFetcherTask

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

func NewTransactionSeqCreatorTask

func NewTransactionSeqCreatorTask(db *store.Store) *transactionSeqCreatorTask

func NewValidatorAggCreatorTask

func NewValidatorAggCreatorTask(db *store.Store) *validatorAggCreatorTask

func NewValidatorAggPersistorTask added in v0.4.2

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

func NewValidatorFetcherTask

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

func NewValidatorSeqCreatorTask

func NewValidatorSeqCreatorTask(db *store.Store) *validatorSeqCreatorTask

func NewValidatorSeqPersistorTask added in v0.4.2

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

func NewValidatorsParserTask added in v0.4.0

func NewValidatorsParserTask() *validatorsParserTask

func StakingToSequence

func StakingToSequence(syncable *model.Syncable, rawState *statepb.State) (*model.StakingSeq, error)

func TransactionToSequence

func TransactionToSequence(syncable *model.Syncable, rawTransactions []*transactionpb.Transaction) ([]model.TransactionSeq, error)

func ValidatorToSequence

func ValidatorToSequence(syncable *model.Syncable, rawValidators []*validatorpb.Validator, parsedValidators ParsedValidatorsData) ([]model.ValidatorSeq, error)

Types

type BackfillConfig added in v0.4.2

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

type BackfillSourceConfig added in v0.4.2

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

type BlockFetcherTask

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

func (*BlockFetcherTask) GetName added in v0.4.0

func (t *BlockFetcherTask) GetName() string

func (*BlockFetcherTask) Run

type HeightMeta

type HeightMeta struct {
	Height       int64
	Time         types.Time
	AppVersion   uint64
	BlockVersion uint64
}

type IndexSourceConfig added in v0.4.2

type IndexSourceConfig struct {
	BatchSize   int64
	StartHeight int64
}

type ParsedBlockData

type ParsedBlockData struct {
	TransactionsCount int64
	ProposerEntityUID string
}

type ParsedValidatorsData

type ParsedValidatorsData map[string]parsedValidator

type RunConfig added in v0.4.2

type RunConfig struct {
	Height          int64
	DesiredTargetID int64
	Dry             bool
}

type StakingStateFetcherTask added in v0.4.0

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

func (*StakingStateFetcherTask) GetName added in v0.4.0

func (t *StakingStateFetcherTask) GetName() string

func (*StakingStateFetcherTask) Run added in v0.4.0

type StartConfig added in v0.4.2

type StartConfig struct {
	BatchSize   int64
	StartHeight int64
}

type StateFetcherTask

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

func (*StateFetcherTask) GetName added in v0.4.0

func (t *StateFetcherTask) GetName() string

func (*StateFetcherTask) Run

type TransactionFetcherTask

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

func (*TransactionFetcherTask) GetName added in v0.4.0

func (t *TransactionFetcherTask) GetName() string

func (*TransactionFetcherTask) Run

type ValidatorFetcherTask

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

func (*ValidatorFetcherTask) GetName added in v0.4.0

func (t *ValidatorFetcherTask) GetName() string

func (*ValidatorFetcherTask) Run

Jump to

Keyboard shortcuts

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