EgressWatcher
Defined in: src/egress-watch.ts:105
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new EgressWatcher(
deps):EgressWatcher
Defined in: src/egress-watch.ts:115
Parameters
Section titled “Parameters”Returns
Section titled “Returns”EgressWatcher
Methods
Section titled “Methods”start()
Section titled “start()”start(
sessionId,opts):void
Defined in: src/egress-watch.ts:130
Start watching dnsLogPath for sessionId. Idempotent — a duplicate start
for the same id is a no-op (existing watcher preserved).
Parameters
Section titled “Parameters”sessionId
Section titled “sessionId”string
allowlist
Section titled “allowlist”string[]
dnsLogPath
Section titled “dnsLogPath”string
repoPath
Section titled “repoPath”string
Returns
Section titled “Returns”void
stop()
Section titled “stop()”stop(
sessionId):void
Defined in: src/egress-watch.ts:154
Stop watching sessionId and drop all per-session state. Idempotent.
Parameters
Section titled “Parameters”sessionId
Section titled “sessionId”string
Returns
Section titled “Returns”void
stopAll()
Section titled “stopAll()”stopAll():
void
Defined in: src/egress-watch.ts:162
Stop all active watchers (shutdown).
Returns
Section titled “Returns”void
tick()
Section titled “tick()”tick(
sessionId,opts):Promise<void>
Defined in: src/egress-watch.ts:176
Single poll tick: read new bytes from dns.log, parse query lines, emit drops. All errors are swallowed so a bad log never throws out of the timer.
Exposed as a public method so tests can call it directly (no real timers).
Parameters
Section titled “Parameters”sessionId
Section titled “sessionId”string
allowlist
Section titled “allowlist”string[]
dnsLogPath
Section titled “dnsLogPath”string
repoPath
Section titled “repoPath”string
Returns
Section titled “Returns”Promise<void>