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
Part of #294.
Summary
Update every call site in the codebase that used the old
NewManager+NewConfigurationtwo-step pattern (orsrv.NewConfig) to use the newgorums.NewConfig(nodes, dialOptions...)API.Changes
config_test.go: replaceNewManager/NewConfigurationwithNewConfig; usecfg.Close()for teardownserver_test.go: replacesrv.NewConfig(...)withgorums.NewConfig(..., gorums.WithServer(srv))inbound_manager_test.go: update toNewConfigtesting_shared.go: updateTestConfigurationto callNewConfigwithwithManageroptiontesting_bufconn.go: addbufconnDialOptionhelper; updategetOrCreateManagertestopts.go: introducemanagerReftype and updateWithManagerto take aConfigurationinstead of*Managerexamples/storage/client.go: replace two-step setup withproto.NewConfig; addcfg.Close()examples/storage/repl.go: removemgrfield fromrepl; access nodes viacfg.Nodes()cmd/benchmark/main.go: replacebenchmark.NewManager/benchmark.NewConfigurationwithbenchmark.NewConfig; addcfg.Close()internal/tests/config/config_test.go: update to new APIFiles 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