NetworkMockInitializer
Singleton initializer for the network mock module's repositories.
This object is responsible for constructing and holding the single instances of MockStateRepository and MockConfigRepository for the lifetime of the process. It is initialised once from devview-networkmock's NetworkMock.initModule() and read by both devview-networkmock (UI) and devview-networkmock-ktor (Ktor plugin).
Initialisation Order
The following order is guaranteed by rememberModules:
com.worldline.devview.utils.RequiresDataStore.initDataStore — initialises NetworkMockDataStoreDelegate so DataStore is ready
NetworkMock.initModule()— calls initialize, passing the DataStore from the delegate explicitly
Why an object
devview-networkmock-ktor has no Compose context and no access to the NetworkMock class (which lives in devview-networkmock). A process-level singleton in core is the only location both modules can read repositories from without creating a circular dependency.
See also
Functions
Initialises the repositories for the network mock module.
Returns the com.worldline.devview.networkmock.core.repository.MockConfigRepository instance.
Returns the com.worldline.devview.networkmock.core.repository.MockStateRepository instance.