Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine interface { Reader() Reader Writer() Writer //return three value, field to vearchpb.Field , new Schema info , error NewSnapshot() (proto.Snapshot, error) ApplySnapshot(peers []proto.Peer, iter proto.SnapIterator) error Optimize() error IndexStatus() int EngineStatus(status *EngineStatus) error Close() HasClosed() bool UpdateMapping(space *entity.Space) error GetMapping() *mapping.IndexMapping GetSpace() *entity.Space GetPartitionID() entity.PartitionID SetEngineCfg(config *gamma.Config) error GetEngineCfg(config *gamma.Config) error }
Engine is the interface that wraps the core operations of a document store.
type EngineStatus ¶
type Reader ¶
type Reader interface { GetDoc(ctx context.Context, doc *vearchpb.Document) error ReadSN(ctx context.Context) (int64, error) DocCount(ctx context.Context) (uint64, error) Capacity(ctx context.Context) (int64, error) Search(ctx context.Context, request *vearchpb.SearchRequest, resp *vearchpb.SearchResponse) error }
Reader is the read interface to an engine's data.
type Writer ¶
type Writer interface { // use do by single cmd , support create update replace or delete Write(ctx context.Context, docCmd *vearchpb.DocCmd) error // flush memory to segment, new reader will read the newest data Flush(ctx context.Context, sn int64) error // commit is renew a memory block, return a chan to client, client get the chan to wait the old memory flush to segment Commit(ctx context.Context, sn int64) (chan error, error) }
Writer is the write interface to an engine's data.
Click to show internal directories.
Click to hide internal directories.