MCPcopy Create free account
hub / github.com/astercloud/aster / MemoryStore

Struct MemoryStore

pkg/vector/memory_store.go:12–16  ·  view source on GitHub ↗

MemoryStore 一个简单的内存向量存储实现, 仅用于示例和测试。 不适合生产环境, 但可以帮助用户快速理解接口用法。

Source from the content-addressed store, hash-verified

10// MemoryStore 一个简单的内存向量存储实现, 仅用于示例和测试。
11// 不适合生产环境, 但可以帮助用户快速理解接口用法。
12type MemoryStore struct {
13 mu sync.RWMutex
14 docs map[string]Document
15 index map[string][]string // namespace -> []docID
16}
17
18// NewMemoryStore 创建内存向量存储。
19func NewMemoryStore() *MemoryStore {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected