返回 DeepSeek-Reasonix
skill_watch.go
根目录 / internal / boot / skill_watch.go
1 package boot
2
3 import (
4 "io"
5
6 "reasonix/internal/skill"
7 "reasonix/internal/skill/skillwatch"
8 )
9
10 func newSkillWatchService(enabled bool, stderr io.Writer) *skillwatch.Service {
11 if !enabled {
12 return nil
13 }
14 return skillwatch.NewService(skillwatch.Options{Stderr: stderr})
15 }
16
17 func closeSkillsWithWatcher(primary, all *skill.Store, watchService **skillwatch.Service) {
18 closeSkillStores(primary, all)
19 if *watchService != nil {
20 _ = (*watchService).Close()
21 *watchService = nil
22 }
23 }
24
24 lines GO