NewChunkConfigService 创建分块配置服务
(db *gorm.DB)
| 137 | |
| 138 | // NewChunkConfigService 创建分块配置服务 |
| 139 | func NewChunkConfigService(db *gorm.DB) *ChunkConfigService { |
| 140 | return &ChunkConfigService{ |
| 141 | db: db, |
| 142 | configCache: make(map[string]*ChunkConfig), |
| 143 | missingConfigCache: make(map[string]struct{}), |
| 144 | systemConfigCache: make(map[string]*ChunkConfig), |
| 145 | } |
| 146 | } |
| 147 | |
| 148 | // GetConfig 获取分块配置(支持4层级联:默认 → 站点 → 知识库 → 文档)GetConfig |
| 149 | func (s *ChunkConfigService) GetConfig(eid int64, libraryID *int64, chunkType string) (*ChunkConfig, error) { |
no outgoing calls
no test coverage detected