Versions in this module Expand all Collapse all v0 v0.1.1 Jan 22, 2022 Changes in this version + type BranchesInfo struct + BranchIDByCreators [][]idx.Validator + BranchIDCreatorIdxs []idx.Validator + BranchIDLastSeq []idx.Event + type Callbacks struct + GetHighestBefore func(hash.Event) HighestBeforeI + GetLowestAfter func(hash.Event) LowestAfterI + NewHighestBefore func(idx.Validator) HighestBeforeI + NewLowestAfter func(idx.Validator) LowestAfterI + OnDbReset func(db kvdb.Store) + OnDropNotFlushed func() + SetHighestBefore func(hash.Event, HighestBeforeI) + SetLowestAfter func(hash.Event, LowestAfterI) + type Engine struct + func NewIndex(crit func(error), callbacks Callbacks) *Engine + func (vi *Engine) Add(e dag.Event) error + func (vi *Engine) AtLeastOneFork() bool + func (vi *Engine) BranchesInfo() *BranchesInfo + func (vi *Engine) DfsSubgraph(head dag.Event, walk func(hash.Event) (godeeper bool)) error + func (vi *Engine) DropNotFlushed() + func (vi *Engine) Flush() + func (vi *Engine) GetEventBranchID(id hash.Event) idx.Validator + func (vi *Engine) GetMergedHighestBefore(id hash.Event) HighestBeforeI + func (vi *Engine) InitBranchesInfo() + func (vi *Engine) Reset(validators *pos.Validators, db kvdb.Store, getEvent func(hash.Event) dag.Event) + func (vi *Engine) SetEventBranchID(id hash.Event, branchID idx.Validator) + type HighestBeforeI interface + CollectFrom func(other HighestBeforeI, branches idx.Validator) + GatherFrom func(to idx.Validator, other HighestBeforeI, from []idx.Validator) + InitWithEvent func(i idx.Validator, e dag.Event) + IsEmpty func(i idx.Validator) bool + IsForkDetected func(i idx.Validator) bool + MinSeq func(i idx.Validator) idx.Event + Seq func(i idx.Validator) idx.Event + SetForkDetected func(i idx.Validator) + type LowestAfterI interface + InitWithEvent func(i idx.Validator, e dag.Event) + Visit func(i idx.Validator, e dag.Event) bool