Remove ServerBuilder
in favour of simple constructor on Server
#25903
Labels
ServerBuilder
in favour of simple constructor on Server
#25903
Problem statement
The
ServerBuilder
type causes friction when extending the state that is provided to to theServer
type.A builder pattern seems unnecessary here. The number of generics tends to cause "type wars" when introducing changes. Since we only create one
Server
in a given instance, a simple constructor should suffice.Proposed solution
Remove
ServerBuilder
in favour of aServer::new
method that accepts aCreateServerArgs
struct with whatever state is needed to create the server. This would likely adopt a lot of the logic from the existingSerberBuilder::build
method:influxdb/influxdb3_server/src/builder.rs
Lines 153 to 190 in 44ca7a4
Additional context
Consideration should be given to how this will integrate to enterprise, in cases where we need to add enterprise-specific state to the server. Currently, the builder is causing pain points there when merging from core to enterprise.
The text was updated successfully, but these errors were encountered: