Skip to content

Simplify and unify the constructor and option API #294

@meling

Description

@meling

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

  • Manager is an internal implementation detail that should not be part of the public API.
  • ManagerOption is an awkward name; DialOption aligns with gRPC conventions and mirrors ServerOption / CallOption.
  • The two-step NewManager + NewConfiguration pattern is redundant; a single NewConfig suffices.
  • (*Server).NewConfig duplicates gorums.NewConfig(..., gorums.WithServer(srv)).
  • Configuration.Manager() exposes internal state unnecessarily.

Sub-issues

Verification

go test -v -timeout=15s ./...
go test -tags=integration ./...

All tests must pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions