up
Some checks failed
Signals CI & Image / signals-ci (push) Has been cancelled
Signals Reachability Scoring & Events / reachability-smoke (push) Has been cancelled
Signals Reachability Scoring & Events / sign-and-upload (push) Has been cancelled
Manifest Integrity / Validate Schema Integrity (push) Has been cancelled
Manifest Integrity / Validate Contract Documents (push) Has been cancelled
Manifest Integrity / Validate Pack Fixtures (push) Has been cancelled
Manifest Integrity / Audit SHA256SUMS Files (push) Has been cancelled
Manifest Integrity / Verify Merkle Roots (push) Has been cancelled
Docs CI / lint-and-preview (push) Has been cancelled
Some checks failed
Signals CI & Image / signals-ci (push) Has been cancelled
Signals Reachability Scoring & Events / reachability-smoke (push) Has been cancelled
Signals Reachability Scoring & Events / sign-and-upload (push) Has been cancelled
Manifest Integrity / Validate Schema Integrity (push) Has been cancelled
Manifest Integrity / Validate Contract Documents (push) Has been cancelled
Manifest Integrity / Validate Pack Fixtures (push) Has been cancelled
Manifest Integrity / Audit SHA256SUMS Files (push) Has been cancelled
Manifest Integrity / Verify Merkle Roots (push) Has been cancelled
Docs CI / lint-and-preview (push) Has been cancelled
This commit is contained in:
@@ -155,7 +155,9 @@ public static class VexLensServiceCollectionExtensions
|
||||
IServiceCollection services,
|
||||
VexLensStorageOptions options)
|
||||
{
|
||||
switch (options.Driver.ToLowerInvariant())
|
||||
var driver = (options.Driver ?? "memory").Trim();
|
||||
|
||||
switch (driver.ToLowerInvariant())
|
||||
{
|
||||
case "memory":
|
||||
services.TryAddSingleton<IConsensusProjectionStore>(sp =>
|
||||
@@ -165,19 +167,9 @@ public static class VexLensServiceCollectionExtensions
|
||||
});
|
||||
break;
|
||||
|
||||
case "mongo":
|
||||
// MongoDB storage would be registered here
|
||||
// For now, fall back to in-memory
|
||||
services.TryAddSingleton<IConsensusProjectionStore>(sp =>
|
||||
{
|
||||
var emitter = sp.GetRequiredService<IConsensusEventEmitter>();
|
||||
return new InMemoryConsensusProjectionStore(emitter);
|
||||
});
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new InvalidOperationException(
|
||||
$"Unknown VexLens storage driver: {options.Driver}");
|
||||
$"Unsupported VexLens storage driver: '{options.Driver}'. Supported drivers: memory.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user