Skip to content

refactor: rename ManagerOption to DialOption#302

Merged
meling merged 1 commit intomasterfrom
feature/295/rename-manageroption-to-dialoption
Mar 25, 2026
Merged

refactor: rename ManagerOption to DialOption#302
meling merged 1 commit intomasterfrom
feature/295/rename-manageroption-to-dialoption

Conversation

@meling
Copy link
Member

@meling meling commented Mar 25, 2026

Summary

Renames the ManagerOption type to DialOption to 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 explicit Manager concept from the public API.

Changes

  • Rename ManagerOption type alias to DialOption in opts.go
  • Update all internal usages and documentation

Related

Part of #294
Closes #295

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.
@deepsource-io
Copy link
Contributor

deepsource-io bot commented Mar 25, 2026

DeepSource Code Review

We reviewed changes in 43ae4ee...97f3ad1 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 7:56a.m. Review ↗
Shell Mar 25, 2026 7:56a.m. Review ↗

@meling meling linked an issue Mar 25, 2026 that may be closed by this pull request
@meling meling requested a review from Copilot March 25, 2026 10:13
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

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 (and dialOptions) and update constructors/helpers to accept and propagate DialOption.
  • Keep ManagerOption as 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.

@meling meling merged commit fd6a7b9 into master Mar 25, 2026
9 checks passed
@meling meling deleted the feature/295/rename-manageroption-to-dialoption branch March 25, 2026 10:47
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: rename ManagerOption to DialOption chore: rename ManagerOption to ClientOption?

2 participants