Documentation ¶
Index ¶
Constants ¶
const IndexNameFeeds = "userFeeds"
const IndexNamePrivates = "privates"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CombinedIndex ¶
type CombinedIndex struct {
// contains filtered or unexported fields
}
func NewCombinedIndex ¶
func NewCombinedIndex( repoPath string, box *private.Manager, self refs.FeedRef, rxlog margaret.Log, u, p, bt, tan *roaring.MultiLog, oh multilog.MultiLog, sm *statematrix.StateMatrix, ) (*CombinedIndex, error)
NewCombinedIndex creates one big index which updates the multilogs users, byType, private and tangles. Compared to the "old" fatbot approach of just having 4 independant indexes, this one updates all 4 of them, resulting in less read-overhead while also being able to index private massages by tangle and type.
func (*CombinedIndex) Box2Reindex ¶
func (idx *CombinedIndex) Box2Reindex(author refs.FeedRef) error
Box2Reindex takes advantage of the other bitmap indexes to reindex just the messages from the passed author that are box2 but not yet readable by us.
- taking private:meta:box2
- ANDing it with the one of the author (intersection)
- subtracting all the messages we _can_ read (private:box2:$ourFeed)
func (*CombinedIndex) Close ¶
func (idx *CombinedIndex) Close() error
func (*CombinedIndex) Pour ¶
func (idx *CombinedIndex) Pour(ctx context.Context, swv interface{}) error
Pour calls the processing function to add a value to a sublog.
func (*CombinedIndex) QuerySpec ¶
func (idx *CombinedIndex) QuerySpec() margaret.QuerySpec
QuerySpec returns the query spec that queries the next needed messages from the log
type MembershipStore ¶
type MembershipStore struct {
// contains filtered or unexported fields
}
MembershipStore isn't strictly a multilog but putting it in package private gave cyclic import
func NewMembershipIndex ¶
func NewMembershipIndex(logger log.Logger, db *badger.DB, self refs.FeedRef, unboxer *private.Manager, comb *CombinedIndex) (*MembershipStore, librarian.SinkIndex)
NewMembershipIndex tracks group/add-member messages and triggers re-reading box2 messages by the invited people that couldn't be read before.
func (MembershipStore) Close ¶
func (mc MembershipStore) Close() error