vqueue

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2021 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

func WithDeleteBufferPoolSize

func WithDeleteBufferPoolSize(size int) Option

func WithDeleteBufferSize

func WithDeleteBufferSize(size int) Option

func WithErrGroup

func WithErrGroup(eg errgroup.Group) Option

func WithInsertBufferPoolSize

func WithInsertBufferPoolSize(size int) Option

func WithInsertBufferSize

func WithInsertBufferSize(size int) Option

type Queue

type Queue interface {
	Start(ctx context.Context) (<-chan error, error)
	PushInsert(uuid string, vector []float32, date int64) error
	PushDelete(uuid string, date int64) error
	GetVector(uuid string) ([]float32, bool)
	RangePopInsert(ctx context.Context, f func(uuid string, vector []float32) bool)
	RangePopDelete(ctx context.Context, f func(uuid string) bool)
	IVQLen() int
	IVCLen() int
	DVQLen() int
	DVCLen() int
}

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