Skip to content

refactor: update all callers to new NewConfig signature #299

@meling

Description

@meling

Part of #294.

Summary

Update every call site in the codebase that used the old NewManager + NewConfiguration two-step pattern (or srv.NewConfig) to use the new gorums.NewConfig(nodes, dialOptions...) API.

Changes

  • config_test.go: replace NewManager / NewConfiguration with NewConfig; use cfg.Close() for teardown
  • server_test.go: replace srv.NewConfig(...) with gorums.NewConfig(..., gorums.WithServer(srv))
  • inbound_manager_test.go: update to NewConfig
  • testing_shared.go: update TestConfiguration to call NewConfig with withManager option
  • testing_bufconn.go: add bufconnDialOption helper; update getOrCreateManager
  • testopts.go: introduce managerRef type and update WithManager to take a Configuration instead of *Manager
  • examples/storage/client.go: replace two-step setup with proto.NewConfig; add cfg.Close()
  • examples/storage/repl.go: remove mgr field from repl; access nodes via cfg.Nodes()
  • cmd/benchmark/main.go: replace benchmark.NewManager / benchmark.NewConfiguration with benchmark.NewConfig; add cfg.Close()
  • internal/tests/config/config_test.go: update to new API

Files Changed

config_test.go, server_test.go, inbound_manager_test.go, testing_shared.go, testing_bufconn.go, testopts.go,
examples/storage/client.go, examples/storage/repl.go, cmd/benchmark/main.go, internal/tests/config/config_test.go

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