Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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.