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.
go test -v -timeout=15s ./...
go test -tags=integration ./...
All tests must pass.
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.NewManager+NewConfigurationpattern is redundant; a singleNewConfigsuffices.(*Server).NewConfigduplicatesgorums.NewConfig(..., gorums.WithServer(srv)).Configuration.Manager()exposes internal state unnecessarily.Sub-issues
ManagerOptiontoDialOption(closes chore: rename ManagerOption to ClientOption? #222)ManagerasoutboundManagerWithServerdial option; remove(*Server).NewConfigNewConfigsignature; removeNewConfigurationandManageraliasNewConfigsignatureVerification
All tests must pass.