feat: add dynamic mDNS interface management with runtime monitoring #61
+586
−21
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Implements dynamic mDNS interface management that gracefully handles network interface availability changes at runtime. Fixes #62
Note: While the primary fix targets configurations with specific interfaces, the monitoring infrastructure benefits all deployment modes by tracking interface state changes.
Changes
Core Implementation:
interfaces()method to handle partial interface availability (non-fatal resolution)Code Quality:
getUsableInterface()helper function to reduce code duplicationKey Features
✅ Graceful degradation: Announces on available interfaces even when some are missing
✅ Runtime adaptation: Automatically detects and responds to interface changes (appear/disappear/re-appear)
✅ Backwards compatible: No API changes; existing code continues to work unchanged
✅ Clean shutdown: Proper goroutine lifecycle management prevents resource leaks
✅ Test coverage: Added tests for partial interface availability and helper functions
Behavior
When specific interfaces are configured:
When no specific interfaces are configured (default):