vqueue

package
v1.7.12 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package vqueue manages the vector cache layer for reducing FFI overhead for fast Agent processing.

Package vqueue manages the vector cache layer for reducing FFI overhead for fast Agent processing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(n *vqueue) error

Option represents the functional option for vqueue.

type Queue

type Queue interface {
	PushInsert(uuid string, vector []float32, date int64) error
	PushDelete(uuid string, date int64) error
	GetVector(uuid string) (vec []float32, timestamp int64, exists bool)
	Range(ctx context.Context, f func(uuid string, vector []float32, ts int64) bool)
	RangePopInsert(ctx context.Context, now int64, f func(uuid string, vector []float32, date int64) bool)
	RangePopDelete(ctx context.Context, now int64, f func(uuid string) bool)
	IVExists(uuid string) bool
	DVExists(uuid string) bool
	IVQLen() int
	DVQLen() int
}

Queue represents vector queue cache interface.

func New

func New(opts ...Option) (Queue, error)

Jump to

Keyboard shortcuts

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