memstore

package
v1.7.14 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exists

func Exists(kv kvs.BidiMap, vq vqueue.Queue, uuid string) (oid uint32, ok bool)

func GetObject

func GetObject(
	kv kvs.BidiMap, vq vqueue.Queue, uuid string, getVectorFn func(oid uint32) ([]float32, error),
) (vec []float32, timestamp int64, err error)

func ListObjectFunc

func ListObjectFunc(
	ctx context.Context,
	kv kvs.BidiMap,
	vq vqueue.Queue,
	f func(uuid string, oid uint32, ts int64) bool,
)

ListObjectFunc applies the input function on each index stored in the kvs and vqueue. Use this function for performing something on each object with caring about the memory usage. If the vector exists in the vqueue, this vector is not indexed so the oid(object ID) is processed as 0.

func UUIDs

func UUIDs(ctx context.Context, kv kvs.BidiMap, vq vqueue.Queue) (uuids []string)

func UpdateTimestamp

func UpdateTimestamp(
	kv kvs.BidiMap,
	vq vqueue.Queue,
	uuid string,
	ts int64,
	force bool,
	getVectorFn func(oid uint32) ([]float32, error),
) (err error)

UpdateTimestamp updates memstore(kvs, vqueue) data's timestamp

Types

This section is empty.

Jump to

Keyboard shortcuts

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