openLocalStore static method

Future<OmnyStore> openLocalStore(
  1. String path, {
  2. Logger logger = const NoopLogger(),
  3. String providerId = 'local',
})

Opens an embedded store rooted at path.

Metadata lives in metadata/ as JSON and artifacts in objects/, so the whole registry is one directory that can be backed up, copied or mounted as a volume.

Implementation

static Future<OmnyStore> openLocalStore(
  String path, {
  Logger logger = const NoopLogger(),
  String providerId = 'local',
}) async => OmnyStore(
  repositories: await JsonFileRepositories.open('$path/metadata'),
  storage: LocalObjectStorage('$path/objects'),
  logger: logger,
  providerId: providerId,
);