manager 统一知识管理器实现
| 18 | |
| 19 | // manager 统一知识管理器实现 |
| 20 | type manager struct { |
| 21 | config *ManagerConfig |
| 22 | |
| 23 | // 存储组件 |
| 24 | memoryManager *memory.Manager |
| 25 | vectorStore vector.VectorStore |
| 26 | embedder vector.Embedder |
| 27 | |
| 28 | // 运行时状态 |
| 29 | mu sync.RWMutex |
| 30 | cache map[string]*cacheEntry |
| 31 | stats map[string]*KnowledgeStats |
| 32 | running bool |
| 33 | |
| 34 | // 审计和安全(策略可选) |
| 35 | auditStrategy AuditStrategy |
| 36 | piiStrategy PIIStrategy |
| 37 | |
| 38 | // 轻量核心管线(可选) |
| 39 | corePipeline *core.Pipeline |
| 40 | } |
| 41 | |
| 42 | // cacheEntry 缓存条目 |
| 43 | type cacheEntry struct { |
nothing calls this directly
no outgoing calls
no test coverage detected