startProcess method
Future<Satellite>
startProcess({
- required DbName dbName,
- required DBSchema dbDescription,
- required DatabaseAdapter adapter,
- required Migrator migrator,
- required Notifier notifier,
- required SocketFactory socketFactory,
- required HydratedConfig config,
- SatelliteOverrides? overrides,
Implementation
@override
Future<Satellite> startProcess({
required DbName dbName,
required DBSchema dbDescription,
required DatabaseAdapter adapter,
required Migrator migrator,
required Notifier notifier,
required SocketFactory socketFactory,
required HydratedConfig config,
SatelliteOverrides? overrides,
}) async {
if (_shouldFailToStart) {
throw Exception('Failed to start satellite process');
}
final String namespace = migrator.queryBuilder.defaultNamespace;
var effectiveOpts = satelliteDefaults(namespace);
if (overrides != null) {
effectiveOpts = effectiveOpts.copyWithOverrides(overrides);
}
if (satellites[dbName] != null) {
return satellites[dbName]!;
}
final satellite = MockSatelliteProcess(
dbName: dbName,
adapter: adapter,
migrator: migrator,
notifier: notifier,
socketFactory: socketFactory,
opts: effectiveOpts,
);
satellites[dbName] = satellite;
await satellite.start(const AuthConfig());
return satellite;
}