Skip to content

EgressWatcher

Defined in: src/egress-watch.ts:105

new EgressWatcher(deps): EgressWatcher

Defined in: src/egress-watch.ts:115

EgressWatcherDeps

EgressWatcher

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).

string

string[]

string

string

void


stop(sessionId): void

Defined in: src/egress-watch.ts:154

Stop watching sessionId and drop all per-session state. Idempotent.

string

void


stopAll(): void

Defined in: src/egress-watch.ts:162

Stop all active watchers (shutdown).

void


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).

string

string[]

string

string

Promise<void>