refactor: rename ManagerOption to DialOption#302
Merged
Conversation
Renames the exported option type from ManagerOption to DialOption, aligning with gRPC conventions (grpc.DialOption) and the existing ServerOption / CallOption naming pattern. A deprecated type alias (type ManagerOption = DialOption) is added temporarily so that existing generated *_gorums.pb.go files continue to compile until they are regenerated in a follow-up commit. Closes #295. Related to #294.
Contributor
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| Go | Mar 25, 2026 7:56a.m. | Review ↗ | |
| Shell | Mar 25, 2026 7:56a.m. | Review ↗ |
Contributor
There was a problem hiding this comment.
Pull request overview
Renames the outbound “manager” option type to DialOption across the codebase (while keeping ManagerOption as a deprecated alias), aligning naming with gRPC’s grpc.DialOption and preparing for a slimmer public API surface.
Changes:
- Introduce
DialOption(anddialOptions) and update constructors/helpers to accept and propagateDialOption. - Keep
ManagerOptionas a deprecated alias for compatibility. - Update system/test helpers and protoc-gen-gorums templates/docs to use
DialOption.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| opts.go | Defines DialOption, deprecates ManagerOption alias, updates option helpers and splitOptions. |
| mgr.go | Updates Manager to store/apply dialOptions and NewManager(...DialOption). |
| config.go | Updates NewConfig docs and wiring to pass dial options into NewManager. |
| system.go | Updates NewSystem/NewLocalSystems option splitting and outbound config creation to use DialOption. |
| opts_test.go | Updates typed-nil test coverage to use DialOption. |
| testopts.go | Updates test option extraction to recognize DialOption. |
| testing_shared.go | Updates test helpers (InsecureDialOptions, TestManager) to use DialOption. |
| testing_integration.go | Updates integration test manager creation to use DialOption. |
| testing_bufconn.go | Updates bufconn test manager creation to use DialOption. |
| cmd/protoc-gen-gorums/gengorums/template_static.go | Updates generated wrapper signature to ...gorums.DialOption. |
| cmd/protoc-gen-gorums/dev/aliases.go | Updates dev aliases wrapper signature/docs to ...gorums.DialOption. |
| cmd/benchmark/main.go | Updates benchmark wiring to use DialOption slice and variadic call. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced Mar 25, 2026
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
Renames the
ManagerOptiontype toDialOptionto better reflect what these options configure: how gorums dials out to remote peers.This aligns the naming with the gRPC ecosystem (
grpc.DialOption) and prepares for the removal of the explicitManagerconcept from the public API.Changes
ManagerOptiontype alias toDialOptioninopts.goRelated
Part of #294
Closes #295