PersistenceStorageEngineOpener typedef

PersistenceStorageEngineOpener = Future<PersistenceStorageEngine> Function(PersistenceKey key, {DatabaseLogger? logger})

Opens the engine for key; called by the client once at Repo start, before the Repo's first operation runs (taking a lease may wait, hence the future). An engine that cannot be opened durably still completes, with isDurable false; the future fails only on programming errors. The lease, degraded mode and storage failures are reported through logger (null: dropped).

Implementation

typedef PersistenceStorageEngineOpener =
    Future<PersistenceStorageEngine> Function(
      PersistenceKey key, {
      DatabaseLogger? logger,
    });