feat: implement watcher monitoring orchestrator (closes #2) #8
No reviewers
Labels
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sneak/dnswatcher#8
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "feature/watcher-implementation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 ✅