Skip to content

refactor: unexport Manager as outboundManager#303

Merged
meling merged 1 commit intomasterfrom
feature/296/unexport-manager
Mar 25, 2026
Merged

refactor: unexport Manager as outboundManager#303
meling merged 1 commit intomasterfrom
feature/296/unexport-manager

Conversation

@meling
Copy link
Member

@meling meling commented Mar 25, 2026

Summary

The Manager type was exported but served purely as an implementation detail for Configuration.
This commit unexports it as outboundManager so users interact only with Configuration, which is the intended public abstraction.

Changes

  • Rename exported Manager to unexported outboundManager throughout the codebase
  • No public API change visible to users (Manager was not documented for direct use)

Related

Part of #294
Closes #296

@deepsource-io
Copy link
Contributor

deepsource-io bot commented Mar 25, 2026

DeepSource Code Review

We reviewed changes in fd6a7b9...252d6b8 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

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 ↗

@meling meling linked an issue Mar 25, 2026 that may be closed by this pull request
Base automatically changed from feature/295/rename-manageroption-to-dialoption to master March 25, 2026 10:47
@meling meling force-pushed the feature/296/unexport-manager branch from ff5966d to 6ad96bb Compare March 25, 2026 10:56
@meling meling requested a review from Copilot March 25, 2026 10:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 to outboundManager and updates method receivers accordingly.
  • Updates node/test helper plumbing to use *outboundManager internally and to construct managers via newOutboundManager.
  • Adds a deprecated exported alias (type Manager = outboundManager) and keeps NewManager as 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.
@meling meling force-pushed the feature/296/unexport-manager branch from 6ad96bb to 252d6b8 Compare March 25, 2026 11:05
@meling meling merged commit 9395ae5 into master Mar 25, 2026
4 of 5 checks passed
@meling meling deleted the feature/296/unexport-manager branch March 25, 2026 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: unexport Manager as outboundManager

2 participants