• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

enbility / ship-go / 24188290012
93%

Build:
DEFAULT BRANCH: dev
Ran 09 Apr 2026 11:44AM UTC
Jobs 1
Files 34
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

09 Apr 2026 11:42AM UTC coverage: 94.779% (-0.3%) from 95.059%
24188290012

push

github

web-flow
feat: add dynamic mDNS interface management with runtime monitoring (#61)

## 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:**
- Modified `interfaces()` method to handle partial interface
availability (non-fatal resolution)
- Added continuous interface monitoring with 15-second polling interval
(when specific interfaces configured)
- Implemented automatic re-announcement when interfaces appear/disappear
- Added proper cleanup on shutdown to prevent goroutine leaks

**Code Quality:**
- Added `getUsableInterface()` helper function to reduce code
duplication
- Implemented thread-safe state tracking with proper mutex protection
- Added comprehensive unit tests for new functionality

## Key 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:
- ✅ Announces on available interfaces, even if some are missing
- ✅ Monitors interface state every 15 seconds
- ✅ Re-announces automatically when interfaces appear or disappear

### When no specific interfaces are configured (default):
- ⚠️ **Known limitation**: Still announces on the interface list
captured at startup
- ⚠️ Does not yet adapt to runtime interface changes
- 🔄 **Future work**: Extend monitoring to detect when new interfaces
appear/exist... (continued)

262 of 301 new or added lines in 3 files covered. (87.04%)

3 existing lines in 1 file now uncovered.

3540 of 3735 relevant lines covered (94.78%)

7031.34 hits per line

Uncovered Changes

Lines Coverage ∆ File
37
92.12
-3.67% mdns/mdns.go
2
95.04
-0.92% mdns/zeroconf.go

Coverage Regressions

Lines Coverage ∆ File
3
92.12
-3.67% mdns/mdns.go
Jobs
ID Job ID Ran Files Coverage
1 24188290012.1 09 Apr 2026 11:44AM UTC 34
94.78
GitHub Action Run
Source Files on build 24188290012
  • Tree
  • List 34
  • Changed 3
  • Source Changed 3
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #24188290012
  • 5364bf45 on github
  • Prev Build on dev (#23893306287)
  • Next Build on dev (#24188525287)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc