Skip to content

Find, verify, and analyze leaked credentials

document Config.SourceManager (#5002)

Amaan Ullahec20cb388c8c
diff --git a/pkg/engine/engine.go b/pkg/engine/engine.go
index 0e2b7d1a1..f7698c891 100644
--- a/pkg/engine/engine.go
+++ b/pkg/engine/engine.go
@@ -128,8 +128,11 @@ type Config struct {
Dispatcher ResultsDispatcher
- // SourceManager is used to manage the sources and units.
- // TODO (ahrav): Update this comment, i'm dumb and don't really know what else it does.
+ // SourceManager orchestrates source enumeration and concurrent chunk production.
+ // The engine consumes chunks from its output channel via ChunksChan, and during
+ // Finish it calls SourceManager.Wait() to drain in-flight work before closing the
+ // downstream channels. Callers construct and own the SourceManager; the engine
+ // neither creates nor closes it.
SourceManager *sources.SourceManager
// PrintAvgDetectorTime sets the printAvgDetectorTime flag on the engine. If set to