Documentation ¶
Index ¶
- Constants
- Variables
- func EventToSequence(syncable *model.Syncable, rawEvents []*eventpb.Event) ([]model.EventSeq, error)
- func NewBackfillSource(cfg *config.Config, db *store.Store, client *client.Client, indexVersion int64) (*backfillSource, error)
- func NewBlockParserTask() *blockParserTask
- func NewBlockSeqCreatorTask(db *store.Store) *blockSeqCreatorTask
- func NewBlockSeqPersistorTask(db *store.Store) pipeline.Task
- func NewConfigParser(file string) (*configParser, error)
- func NewEventSeqCreatorTask(db *store.Store) *eventSeqCreatorTask
- func NewEventSeqPersistorTask(db *store.Store) pipeline.Task
- func NewFetcherTask(client FetcherClient) pipeline.Task
- func NewIndexSource(cfg *config.Config, db *store.Store, client *client.Client, ...) (*indexSource, error)
- func NewLogger() pipeline.Logger
- func NewMainSyncerTask(db *store.Store) pipeline.Task
- func NewPayloadFactory() *payloadFactory
- func NewPipeline(cfg *config.Config, db *store.Store, client *client.Client) (*indexingPipeline, error)
- func NewSink(db *store.Store, versionNumber int64) *sink
- func NewSyncerPersistorTask(db *store.Store) pipeline.Task
- func NewValidatorAggCreatorTask(db *store.Store) *validatorAggCreatorTask
- func NewValidatorAggPersistorTask(db *store.Store) pipeline.Task
- func NewValidatorEraSeqCreatorTask(cfg *config.Config, db *store.Store) *validatorEraSeqCreatorTask
- func NewValidatorEraSeqPersistorTask(db *store.Store) pipeline.Task
- func NewValidatorSessionSeqCreatorTask(cfg *config.Config, db *store.Store) *validatorSessionSeqCreatorTask
- func NewValidatorSessionSeqPersistorTask(db *store.Store) pipeline.Task
- func NewValidatorsParserTask() *validatorsParserTask
- func ToBlockSequence(syncable *model.Syncable, rawBlock *blockpb.Block, ...) (*model.BlockSeq, error)
- func ToValidatorEraSequence(syncable *model.Syncable, firstHeight int64, ...) ([]model.ValidatorEraSeq, error)
- func ToValidatorSessionSequence(syncable *model.Syncable, firstHeight int64, ...) ([]model.ValidatorSessionSeq, error)
- type BackfillConfig
- type ConfigParser
- type FetcherClient
- type FetcherTask
- type HeightMeta
- type IndexConfig
- type IndexSourceConfig
- type ParsedBlockData
- type ParsedValidatorsData
- type PipelineSyncableStore
- type ReportStore
- type RunConfig
Constants ¶
const ( TargetIndexBlockSequences = iota + 1 TargetIndexValidatorSessionSequences TargetIndexValidatorEraSequences TargetIndexValidatorAggregates TargetIndexEventSequences )
const ( BlockParserTaskName = "BlockParser" ValidatorsParserTaskName = "ValidatorsParser" )
const ( SyncerPersistorTaskName = "SyncerPersistor" BlockSeqPersistorTaskName = "BlockSeqPersistor" ValidatorSessionSeqPersistorTaskName = "ValidatorSessionSeqPersistor" ValidatorEraSeqPersistorTaskName = "ValidatorEraSeqPersistor" ValidatorAggPersistorTaskName = "ValidatorAggPersistor" EventSeqPersistorTaskName = "EventSeqPersistor" )
const ( BlockSeqCreatorTaskName = "BlockSeqCreator" ValidatorSessionSeqCreatorTaskName = "ValidatorSessionSeqCreator" ValidatorEraSeqCreatorTaskName = "ValidatorEraSeqCreator" EventSeqCreatorTaskName = "EventSeqCreator" )
const (
CtxReport = "context_report"
)
const (
FetcherTaskName = "Fetcher"
)
const (
MainSyncerTaskName = "MainSyncer"
)
const (
ValidatorAggCreatorTaskName = "ValidatorAggCreator"
)
Variables ¶
var ( ErrBlockSequenceNotValid = errors.New("block sequence not valid") ErrValidatorSessionSequenceNotValid = errors.New("validator session sequence not valid") ErrValidatorEraSequenceNotValid = errors.New("validator era sequence not valid") ErrEventSequenceNotValid = errors.New("event sequence not valid") )
var ( ErrIsPristine = errors.New("cannot run because database is empty") ErrIndexCannotBeRun = errors.New("cannot run index process") ErrBackfillCannotBeRun = errors.New("cannot run backfill process") )
var (
ErrNothingToProcess = errors.New("nothing to process")
)
Functions ¶
func EventToSequence ¶ added in v0.1.2
func NewBackfillSource ¶
func NewBlockParserTask ¶
func NewBlockParserTask() *blockParserTask
func NewBlockSeqCreatorTask ¶
NewBlockSeqCreatorTask creates block sequences
func NewBlockSeqPersistorTask ¶
NewBlockSeqPersistorTask is responsible for storing block to persistence layer
func NewConfigParser ¶ added in v0.2.0
func NewEventSeqCreatorTask ¶ added in v0.1.2
NewEventSeqCreatorTask creates block sequences
func NewEventSeqPersistorTask ¶ added in v0.1.2
NewEventSeqPersistorTask is responsible for storing events info to persistence layer
func NewFetcherTask ¶ added in v0.1.2
func NewFetcherTask(client FetcherClient) pipeline.Task
func NewIndexSource ¶
func NewPayloadFactory ¶
func NewPayloadFactory() *payloadFactory
func NewPipeline ¶
func NewSyncerPersistorTask ¶
NewSyncerPersistorTask is responsible for storing syncable to persistence layer
func NewValidatorAggCreatorTask ¶ added in v0.1.2
func NewValidatorAggPersistorTask ¶ added in v0.1.2
func NewValidatorEraSeqCreatorTask ¶ added in v0.1.2
NewValidatorEraSeqCreatorTask creates validator era sequences
func NewValidatorEraSeqPersistorTask ¶ added in v0.1.2
NewValidatorEraSeqPersistorTask is responsible for storing validator era info to persistence layer
func NewValidatorSessionSeqCreatorTask ¶ added in v0.1.2
func NewValidatorSessionSeqCreatorTask(cfg *config.Config, db *store.Store) *validatorSessionSeqCreatorTask
NewValidatorSessionSeqCreatorTask creates validator session sequences
func NewValidatorSessionSeqPersistorTask ¶ added in v0.1.2
NewValidatorSessionSeqPersistorTask is responsible for storing validator session info to persistence layer
func NewValidatorsParserTask ¶ added in v0.1.2
func NewValidatorsParserTask() *validatorsParserTask
func ToBlockSequence ¶ added in v0.1.2
func ToValidatorEraSequence ¶ added in v0.1.2
func ToValidatorSessionSequence ¶ added in v0.1.2
func ToValidatorSessionSequence(syncable *model.Syncable, firstHeight int64, rawValidatorPerformance []*validatorperformancepb.Validator) ([]model.ValidatorSessionSeq, error)
Types ¶
type BackfillConfig ¶
type ConfigParser ¶ added in v0.2.0
type ConfigParser interface { GetCurrentVersionId() int64 GetAllVersionedVersionIds() []int64 IsAnyVersionSequential(versionIds []int64) bool GetAllAvailableTasks() []pipeline.TaskName GetAllVersionedTasks() ([]pipeline.TaskName, error) GetTasksByVersionIds([]int64) ([]pipeline.TaskName, error) GetTasksByTargetIds([]int64) ([]pipeline.TaskName, error) }
type FetcherClient ¶ added in v0.1.2
type FetcherClient interface {
GetAll(int64) (*heightpb.GetAllResponse, error)
}
type FetcherTask ¶ added in v0.1.2
type FetcherTask struct {
// contains filtered or unexported fields
}
func (*FetcherTask) GetName ¶ added in v0.1.2
func (t *FetcherTask) GetName() string
type HeightMeta ¶
type IndexConfig ¶ added in v0.2.0
type IndexSourceConfig ¶
type ParsedBlockData ¶
type ParsedValidatorsData ¶ added in v0.1.2
type ParsedValidatorsData map[string]parsedValidator
ParsedValidatorsData normalized validator data