refactor: unexport Manager as outboundManager#303
Merged
Conversation
Contributor
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| Go | Mar 25, 2026 11:05a.m. | Review ↗ | |
| Shell | Mar 25, 2026 11:05a.m. | Review ↗ |
Base automatically changed from
feature/295/rename-manageroption-to-dialoption
to
master
March 25, 2026 10:47
ff5966d to
6ad96bb
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to reduce Gorums’ public API surface by renaming the exported outbound connection Manager implementation type to an unexported outboundManager, encouraging users to interact through Configuration instead.
Changes:
- Renames
Manager’s concrete implementation tooutboundManagerand updates method receivers accordingly. - Updates node/test helper plumbing to use
*outboundManagerinternally and to construct managers vianewOutboundManager. - Adds a deprecated exported alias (
type Manager = outboundManager) and keepsNewManageras a deprecated constructor wrapper.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
mgr.go |
Introduces outboundManager, adds deprecated Manager alias, and routes construction through newOutboundManager. |
node.go |
Updates node structs/options to reference *outboundManager for the manager back-reference. |
testopts.go |
Updates test option extraction/storage to use *outboundManager. |
testing_shared.go |
Changes TestManager to return *outboundManager. |
testing_integration.go |
Updates integration test manager creation to use newOutboundManager. |
testing_bufconn.go |
Updates bufconn test manager creation to use newOutboundManager. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Renames the exported Manager type to outboundManager and the exported NewManager constructor to newOutboundManager, hiding the connection-pool type from the public API. A deprecated type alias (type Manager = outboundManager) and a deprecated NewManager wrapper are added temporarily to keep existing callers and generated *_gorums.pb.go files compilable until they are updated in follow-up commits. Internal test helpers (TestManager, getOrCreateManager) and testopts are updated to reference *outboundManager directly. Closes #296. Related to #294.
6ad96bb to
252d6b8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The
Managertype was exported but served purely as an implementation detail forConfiguration.This commit unexports it as
outboundManagerso users interact only withConfiguration, which is the intended public abstraction.Changes
Managerto unexportedoutboundManagerthroughout the codebaseRelated
Part of #294
Closes #296