refactored description types to a desc package for reusability. #9
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.
This moves the *Desc types as well as Endpoint to the desc package. This will let certain other packages, like readpref, define their work without needing to reference the core package at all (only the desc package). This will enable decoupled testing as well as portability.
After having read a lot today about packages, it seems that more smaller, cohesive packages are the preferred way of doing things. Larger packages should probably be broken up. For instance, I'm thinking about moving the clusterMonitorFSM into the desc package, or maybe it's own package. At some point, we'll have gotten a lot of the "stuff" out of the core package and perhaps it can be renamed to something more descriptive of what it is about (mostly connection management).