-
Notifications
You must be signed in to change notification settings - Fork 15
Closed
Description
Overview
Simplify and unify the constructor and option API of Gorums by removing ambiguity, enforcing better type safety, and hiding internal complexities (like Manager).
The changes align Gorums with standard gRPC naming conventions and significantly reduce the public surface area that users need to learn.
Motivation
Manageris an internal implementation detail that should not be part of the public API.ManagerOptionis an awkward name;DialOptionaligns with gRPC conventions and mirrorsServerOption/CallOption.- The two-step
NewManager+NewConfigurationpattern is redundant; a singleNewConfigsuffices. (*Server).NewConfigduplicatesgorums.NewConfig(..., gorums.WithServer(srv)).Configuration.Manager()exposes internal state unnecessarily.
Sub-issues
- refactor: rename ManagerOption to DialOption #295 Rename
ManagerOptiontoDialOption(closes chore: rename ManagerOption to ClientOption? #222) - refactor: unexport Manager as outboundManager #296 Unexport
ManagerasoutboundManager - feat: export WithServer dial option; remove Server.NewConfig #297 Export
WithServerdial option; remove(*Server).NewConfig - refactor: simplify NewConfig signature; remove NewConfiguration and Manager alias #298 Simplify
NewConfigsignature; removeNewConfigurationandManageralias - refactor: update all callers to new NewConfig signature #299 Update all callers to new
NewConfigsignature - chore: regenerate protobuf and gorums generated files #300 Regenerate protobuf and gorums generated files
Verification
go test -v -timeout=15s ./...
go test -tags=integration ./...
All tests must pass.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels