MCPcopy Index your code
hub / github.com/coder/coder / Start

Method Start

agent/filefinder/watcher_fs.go:62–73  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

60}
61
62func (fw *fsWatcher) Start(ctx context.Context) {
63 initEvents := fw.addRecursive(fw.root)
64 if len(initEvents) > 0 {
65 select {
66 case fw.events <- initEvents:
67 case <-ctx.Done():
68 return
69 }
70 }
71 fw.logger.Debug(ctx, "fs watcher started", slog.F("root", fw.root))
72 go fw.loop(ctx)
73}
74func (fw *fsWatcher) Events() <-chan []FSEvent { return fw.events }
75func (fw *fsWatcher) Close() error {
76 fw.mu.Lock()

Callers

nothing calls this directly

Calls 3

addRecursiveMethod · 0.95
loopMethod · 0.95
DoneMethod · 0.45

Tested by

no test coverage detected