inmemindex

package
v0.0.0-...-5d28b2a Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InMemIndex

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

InMemIndex represents a generic B-Tree index. It can be used for indexing different types of attributes by using different implementation of the indexImplementation interface.

func New

func New(attrName string, attrType pbUtils.Attribute_AttributeType) (*InMemIndex, error)

New creates a new in-memory index

func (*InMemIndex) Lookup

func (i *InMemIndex) Lookup(attrPred *pbUtils.AttributePredicate, tsPred *pbUtils.SnapshotTimePredicate, lookupResCh chan utils.ObjectState, errCh chan error)

Lookup performs a range lookup on the index and returns the result.

func (*InMemIndex) Update

func (i *InMemIndex) Update(attrOld *pbUtils.Attribute, attrNew *pbUtils.Attribute, object utils.ObjectState, ts pbUtils.Vectorclock) error

Update updates the index based on a given operation

func (*InMemIndex) UpdateCatchUp

func (i *InMemIndex) UpdateCatchUp(attr *pbUtils.Attribute, object utils.ObjectState, ts pbUtils.Vectorclock) error

UpdateCatchUp updates the index based on a given object state

type Posting

type Posting struct {
	Objects   map[string]utils.ObjectState
	Timestamp pbUtils.Vectorclock
}

Posting ...

Jump to

Keyboard shortcuts

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