indexing

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBackfillRunning = errors.New("backfill already running (use force flag to override it)")
)
View Source
var (
	ErrPurgingDisabled = errors.New("purging disabled")
)
View Source
var (
	ErrReindexRunning = errors.New("reindex already running (use force flag to override it)")
)
View Source
var (
	ErrRunningSequentialReindex = errors.New("indexing skipped because sequential reindex hasn't finished yet")
)

Functions

func NewBackfillUseCase

func NewBackfillUseCase(
	cfg *config.Config,
	cli *client.Client,
	accountDb store.Accounts,
	blockDb store.Blocks,
	databaseDb store.Database,
	eventDb store.Events,
	reportDb store.Reports,
	rewardDb store.Rewards,
	rewardStore *indexer.RewardStore,
	syncableDb store.Syncables,
	systemEventDb store.SystemEvents,
	transactionDb store.Transactions,
	validatorDb store.Validators,
	datastoreClient datastore.DatastoreServiceClient,
) *backfillUseCase

func NewPurgeUseCase

func NewPurgeUseCase(cfg *config.Config, blockDb store.Blocks, validatorDb store.Validators) *purgeUseCase

func NewPurgeWorkerHandler

func NewPurgeWorkerHandler(cfg *config.Config, blockDb store.Blocks, validatorDb store.Validators) *purgeWorkerHandler

func NewReindexUseCase added in v0.8.3

func NewReindexUseCase(
	cfg *config.Config,
	cli *client.Client,
	accountDb store.Accounts,
	blockDb store.Blocks,
	databaseDb store.Database,
	eventDb store.Events,
	reportDb store.Reports,
	rewardDb store.Rewards,
	rewardStore *indexer.RewardStore,
	syncableDb store.Syncables,
	systemEventDb store.SystemEvents,
	transactionDb store.Transactions,
	validatorDb store.Validators,
	datastoreClient datastore.DatastoreServiceClient,
) *reindexUseCase

func NewRunWorkerHandler

func NewRunWorkerHandler(
	cfg *config.Config,
	cli *client.Client,
	accountDb store.Accounts,
	blockDb store.Blocks,
	databaseDb store.Database,
	eventDb store.Events,
	reportDb store.Reports,
	rewardDb store.Rewards,
	rewardStore *indexer.RewardStore,
	syncableDb store.Syncables,
	systemEventDb store.SystemEvents,
	transactionDb store.Transactions,
	validatorDb store.Validators,
	datastoreClient datastore.DatastoreServiceClient,
) *runWorkerHandler

func NewStartUseCase

func NewStartUseCase(
	cfg *config.Config,
	cli *client.Client,
	accountDb store.Accounts,
	blockDb store.Blocks,
	databaseDb store.Database,
	eventDb store.Events,
	reportDb store.Reports,
	rewardDb store.Rewards,
	rewardStore *indexer.RewardStore,
	syncableDb store.Syncables,
	systemEventDb store.SystemEvents,
	transactionDb store.Transactions,
	validatorDb store.Validators,
	datastoreClient datastore.DatastoreServiceClient,
) *startUseCase

func NewSummarizeUseCase

func NewSummarizeUseCase(cfg *config.Config, blockDb store.Blocks, validatorDb store.Validators) *summarizeUseCase

func NewSummarizeWorkerHandler

func NewSummarizeWorkerHandler(cfg *config.Config, blockDb store.Blocks, validatorDb store.Validators) *summarizeWorkerHandler

Types

type BackfillCmdHandler

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

func NewBackfillCmdHandler

func NewBackfillCmdHandler(
	cfg *config.Config,
	cli *client.Client,
	accountDb store.Accounts,
	blockDb store.Blocks,
	databaseDb store.Database,
	eventDb store.Events,
	reportDb store.Reports,
	rewardDb store.Rewards,
	rewardStore *indexer.RewardStore,
	syncableDb store.Syncables,
	systemEventDb store.SystemEvents,
	transactionDb store.Transactions,
	validatorDb store.Validators,
	datastoreClient datastore.DatastoreServiceClient,
) *BackfillCmdHandler

func (*BackfillCmdHandler) Handle

func (h *BackfillCmdHandler) Handle(ctx context.Context, parallel bool, force bool, targetIds []int64)

type BackfillUseCaseConfig

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

type PurgeCmdHandler

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

func NewPurgeCmdHandler

func NewPurgeCmdHandler(cfg *config.Config, blockDb store.Blocks, validatorDb store.Validators) *PurgeCmdHandler

func (*PurgeCmdHandler) Handle

func (h *PurgeCmdHandler) Handle(ctx context.Context)

type ReindexCmdHandler added in v0.8.3

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

func NewReindexCmdHandler added in v0.8.3

func NewReindexCmdHandler(
	cfg *config.Config,
	cli *client.Client,
	accountDb store.Accounts,
	blockDb store.Blocks,
	databaseDb store.Database,
	eventDb store.Events,
	reportDb store.Reports,
	rewardDb store.Rewards,
	rewardStore *indexer.RewardStore,
	syncableDb store.Syncables,
	systemEventDb store.SystemEvents,
	transactionDb store.Transactions,
	validatorDb store.Validators,
	datastoreClient datastore.DatastoreServiceClient,
) *ReindexCmdHandler

func (*ReindexCmdHandler) Handle added in v0.8.3

func (h *ReindexCmdHandler) Handle(ctx context.Context, parallel bool, force bool, targetIds []int64, lastInEra bool, lastInSession bool, trxKinds []model.TransactionKind, startHeight, endHeight int64)

type ReindexUseCaseConfig added in v0.8.3

type ReindexUseCaseConfig struct {
	Parallel      bool
	Force         bool
	TargetIds     []int64
	LastInSession bool
	LastInEra     bool
	TrxKinds      []model.TransactionKind
	StartHeight   int64
	EndHeight     int64
}

type StartCmdHandler

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

func NewStartCmdHandler

func NewStartCmdHandler(
	cfg *config.Config,
	cli *client.Client,
	accountDb store.Accounts,
	blockDb store.Blocks,
	databaseDb store.Database,
	eventDb store.Events,
	reportDb store.Reports,
	rewardDb store.Rewards,
	rewardStore *indexer.RewardStore,
	syncableDb store.Syncables,
	systemEventDb store.SystemEvents,
	transactionDb store.Transactions,
	validatorDb store.Validators,
	datastoreClient datastore.DatastoreServiceClient,
) *StartCmdHandler

func (*StartCmdHandler) Handle

func (h *StartCmdHandler) Handle(ctx context.Context, batchSize int64)

type SummarizeCmdHandler

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

func NewSummarizeCmdHandler

func NewSummarizeCmdHandler(cfg *config.Config, blockDb store.Blocks, validatorDb store.Validators) *SummarizeCmdHandler

func (*SummarizeCmdHandler) Handle

func (h *SummarizeCmdHandler) Handle(ctx context.Context)

Jump to

Keyboard shortcuts

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