-
Type: Improvement
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
Context
The driver.Connection interface is returned by various functions with the x package, which is a pattern in conflict with the Go idiom of "accept interfaces, return structs" defined in the wiki: https://github.com/golang/go/wiki/CodeReviewComments#interfaces . And generally violates the robustness principle: https://en.m.wikipedia.org/wiki/Robustness_principle
Furthermore, this pattern makes migrating the description package to the internal package difficult since the connection interface has a dependency on the description package.
Definition of done
We should centralize the connection object as a struct in a one-off package in the x/mongo/driver director. This was we can take an experimental subset of the server object as the description.
Pitfalls
Unknown
- is depended on by
-
GODRIVER-2965 Make the "description" package internal
- Closed