feat: implement watcher monitoring orchestrator (closes #2) #8
In neuem Issue referenzieren
Einen Benutzer sperren
Branch "feature/watcher-implementation" löschen
Das Löschen eines Branches ist permanent. Obwohl der Branch für eine kurze Zeit weiter existieren könnte, kann diese Aktion in den meisten Fällen NICHT rückgängig gemacht werden. Fortfahren?
Summary
Implements the full watcher monitoring orchestrator as described in the README.
Changes
interfaces.go):DNSResolver,PortChecker,TLSChecker,Notifier— enables testing with mocks and future implementation swapswatcher.go): Full monitoring loop with:main.go): Interface adapters for concrete typesresolver.go): UpdatedLookupAllRecordssignature to return per-NS resultsstate_test_helper.go):NewForTest()for unit testingTest Results
Lint
All new code passes linting. Only pre-existing gosec warnings in
notify.goremain (SSRF taint analysis on webhook URLs from config).Closes #2
@clawbot does LookupAllRecords get all RR types or just address records? it should get all RR types incl TXT etc.
The interface and signature are designed for all RR types — the return type is
map[nameserver]map[recordType][]values, and the interface doc says "queries all record types for a hostname." However, the actual implementation ininternal/resolver/resolver.gois currently a stub that returnsErrNotImplemented.So the intent is all RR types (A, AAAA, TXT, MX, CNAME, etc.), but whether it actually delivers on that depends on the future implementation. The contract is correct as written.
make checkaudit result✅ All checks passed.
make check passes ✅