Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func (*Builder) WithInterval ¶ added in v0.17.1
func (b *Builder) WithInterval(interval int) IndexerBuilder
func (*Builder) WithTasks ¶
func (b *Builder) WithTasks(tasks []string) IndexerBuilder
type IndexerBuilder ¶
type IndexerBuilder interface {
WithTasks(tasks []string) IndexerBuilder
WithInterval(interval int) IndexerBuilder
Build() (Indexer, error)
Name() string
}
func NewBuilder ¶
func NewBuilder(node tasks.DataSource, name string) IndexerBuilder
type Result ¶
type Result struct {
// Name of the task executed.
Name string
// Data extracted during task execution.
Data model.Persistable
// Report containing details of task execution success and duration.
Report visormodel.ProcessingReportList
}
type TipSetIndexer ¶
type TipSetIndexer struct {
Interval int
// contains filtered or unexported fields
}
TipSetIndexer extracts block, message and actor state data from a tipset and persists it to storage. Extraction and persistence are concurrent. Extraction of the a tipset can proceed while data from the previous extraction is being persisted. The indexer may be given a time window in which to complete data extraction. The name of the indexer is used as the reporter in the visor_processing_reports table.
func (*TipSetIndexer) TipSet ¶
func (ti *TipSetIndexer) TipSet(ctx context.Context, ts *types.TipSet) (chan *Result, chan error, error)
TipSet keeps no internal state and asynchronously indexes `ts` returning Result's as they extracted. If the TipSetIndexer encounters an error (fails to fetch ts's parent) it returns immediately and performs no work. If one of the TipSetIndexer's tasks encounters a fatal error, the error is return on the error channel.