In this PR, we rework how the namespace store instantiates namespaces to make a place for libsql wal replicas. To that end, we introduce the NamespaceConfgurators, which are responsible for instantiating replicas, primaries, or schema databases. The NamespaceConfigurators is set up during program initialization with whatever state is required to instantiate a particular namespace type. Depending on the configuration, the NamespaceStore will call the appropriate namespace configurator to load the namespace.
This is useful for libsql-wal since we must keep a handle to the libsql-wal registry to get an injector or a replicator instance.
To reduce the scope of this PR, the implementation of the replication protocol using libsql wal will be integrated later.
In this PR, we rework how the namespace store instantiates namespaces to make a place for libsql wal replicas. To that end, we introduce the
NamespaceConfgurators,
which are responsible for instantiating replicas, primaries, or schema databases. TheNamespaceConfigurators
is set up during program initialization with whatever state is required to instantiate a particular namespace type. Depending on the configuration, theNamespaceStore
will call the appropriate namespace configurator to load the namespace.This is useful for libsql-wal since we must keep a handle to the
libsql-wal
registry to get an injector or a replicator instance.To reduce the scope of this PR, the implementation of the replication protocol using libsql wal will be integrated later.