integrated

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: Apache-2.0, MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exporter

type Exporter interface {
	ExportResult(ctx context.Context, strg model.Storage, height int64, m []*indexer.ModelResult) error
}

type Manager

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

Manager manages the execution of an Indexer. It may be used to index TipSets both serially or in parallel.

func NewManager

func NewManager(strg model.Storage, idxBuilder tipset.IndexerBuilder, opts ...ManagerOpt) (*Manager, error)

NewManager returns a default Manager. Any provided ManagerOpt's will override Manager's default values.

func (*Manager) TipSet

func (i *Manager) TipSet(ctx context.Context, ts *types.TipSet, options ...indexer.Option) (bool, error)

TipSet synchronously indexes and persists `ts`. TipSet returns an error if the Manager's Indexer encounters a fatal error. TipSet returns false if one or more of the Indexer's tasks complete with a status `ERROR` or `SKIPPED`, else returns true. Upon cancellation of `ctx` TipSet will persist all incomplete tasks with status `SKIPPED` before returning.

type ManagerOpt

type ManagerOpt func(i *Manager)

func WithExporter added in v0.10.1

func WithExporter(e Exporter) ManagerOpt

func WithWindow

func WithWindow(w time.Duration) ManagerOpt

WithWindow overrides the Manager's default (0) window with the provided window. The value of the window controls a timeout after which the Manager aborts processing the tipset, marking any incomplete tasks as SKIPPED.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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