Package architecture disallows compilation on systems without network features
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 2.2k
- Forks
- 875
- PR merge metrics
- No merged PRs in 30d
Description
Ideally, we could import github.com/docker/libnetwork and then set NetworkController at runtime. This would allow one to compile and test with mock implementations on various platforms. As it is now, github.com/docker/libnetwork relies on github.com/docker/libnetwork/osl, which only has a linux implementation, making it impossible to test logic unrelated to networking on other platforms (BSD, OSX, Windows, etc.).
Typically, it is better to have the root package define common types and then import from that into sub-packages with implementations. Centralized factories (ie libnetwork.New) can be seeded with registration facilities, allowing alternate implementations.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the root github.com/docker/libnetwork package, NetworkController, and its dependency on github.com/docker/libnetwork/osl. Review how the proposed libnetwork.New factory and registration facilities could separate common types from platform implementations. Done means logic unrelated to networking can compile and be tested with mock implementations on BSD, OSX, and Windows.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- networking
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100