storage

package
v0.0.2-0...-6735cf7 Latest Latest
Warning

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

Go to latest
Published: May 2, 2021 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DimensionMissmatchErr    error = errors.New("Value dimension does not match dataset dimension")
	PartitionNotFoundErr     error = errors.New("Partition not found")
	PartitionNotOnNodeErr    error = errors.New("Partition is not loaded on the node")
	BatchRequestTooLargerErr error = errors.New("Batch request too large")
)
View Source
var (
	DatasetNotFoundErr      error = errors.New("Dataset not found")
	DatasetAlreadyExistsErr error = errors.New("Dataset already exists")
)
View Source
var (
	RaftNotLoadedOnNodeErr error = errors.New("Raft is not loaded on this node")
)

Functions

This section is empty.

Types

type Allocator

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

func NewAllocator

func NewAllocator(clusterConn *cluster.Conn) *Allocator

func (*Allocator) Stop

func (this *Allocator) Stop()

type Dataset

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

func (*Dataset) BatchInsert

func (this *Dataset) BatchInsert(ctx context.Context, items []*pb.BatchItem) (map[uuid.UUID]error, error)

func (*Dataset) BatchRemove

func (this *Dataset) BatchRemove(ctx context.Context, items []*pb.BatchItem) (map[uuid.UUID]error, error)

func (*Dataset) BatchUpdate

func (this *Dataset) BatchUpdate(ctx context.Context, items []*pb.BatchItem) (map[uuid.UUID]error, error)

func (*Dataset) BytesSize

func (this *Dataset) BytesSize(ctx context.Context) (uint64, error)

func (*Dataset) Insert

func (this *Dataset) Insert(ctx context.Context, id uuid.UUID, value math.Vector, metadata index.Metadata) error

func (*Dataset) Len

func (this *Dataset) Len(ctx context.Context) (uint64, error)

func (*Dataset) Meta

func (this *Dataset) Meta() *pb.Dataset

func (*Dataset) PartitionBatchInsert

func (this *Dataset) PartitionBatchInsert(ctx context.Context, partitionId uuid.UUID, items []*pb.BatchItem) (map[uuid.UUID]error, error)

func (*Dataset) PartitionBatchRemove

func (this *Dataset) PartitionBatchRemove(ctx context.Context, partitionId uuid.UUID, items []*pb.BatchItem) (map[uuid.UUID]error, error)

func (*Dataset) PartitionBatchUpdate

func (this *Dataset) PartitionBatchUpdate(ctx context.Context, partitionId uuid.UUID, items []*pb.BatchItem) (map[uuid.UUID]error, error)

func (*Dataset) PartitionInfo

func (this *Dataset) PartitionInfo(ctx context.Context, partitionId uuid.UUID) (uint64, uint64, error)

func (*Dataset) Remove

func (this *Dataset) Remove(ctx context.Context, id uuid.UUID) error

func (*Dataset) Search

func (this *Dataset) Search(ctx context.Context, query math.Vector, k uint) (index.SearchResult, error)

func (*Dataset) SearchPartitions

func (this *Dataset) SearchPartitions(ctx context.Context, partitionIds []uuid.UUID, query math.Vector, k uint) (index.SearchResult, error)

func (*Dataset) SizeInfo

func (this *Dataset) SizeInfo(ctx context.Context) (uint64, uint64, error)

func (*Dataset) Update

func (this *Dataset) Update(ctx context.Context, id uuid.UUID, value math.Vector, metadata index.Metadata) error

type DatasetManager

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

func NewDatasetManager

func NewDatasetManager(raft raft.Group, raftWalDB *badger.DB, raftTransport *raft.RaftTransport, clusterConn *cluster.Conn, allocator *Allocator) (*DatasetManager, error)

func (*DatasetManager) Close

func (this *DatasetManager) Close()

func (*DatasetManager) Create

func (this *DatasetManager) Create(ctx context.Context, dataset *pb.Dataset) (*Dataset, error)

func (*DatasetManager) Delete

func (this *DatasetManager) Delete(ctx context.Context, id uuid.UUID) error

func (*DatasetManager) Get

func (this *DatasetManager) Get(id uuid.UUID) (*Dataset, error)

func (*DatasetManager) List

func (this *DatasetManager) List(ctx context.Context, withSize bool) ([]*pb.Dataset, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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