Add StorageService backed by SurrealDB using the embedded RocksDB provider that persists to ./data (never in memory). Support an optional remote server via SurrealDb:RemoteUrl for frontend sync. Expose readiness and storage probe endpoints under /api/system and add a helper script to start a local SurrealDB server. Set the backend version to 0.0.1.
26 lines
538 B
C#
26 lines
538 B
C#
namespace TarninaHub.Models;
|
|
|
|
public sealed class StorageProbe
|
|
{
|
|
public string Label { get; set; } = "probe";
|
|
|
|
public DateTimeOffset CreatedAt { get; set; }
|
|
}
|
|
|
|
public sealed record StorageInfo(
|
|
string Engine,
|
|
string DataDirectory,
|
|
string Namespace,
|
|
string Database);
|
|
|
|
public sealed record StorageStatusResponse(
|
|
string Engine,
|
|
string DataDirectory,
|
|
string Namespace,
|
|
string Database,
|
|
int ProbeCount);
|
|
|
|
public sealed record StorageProbeResponse(
|
|
string Label,
|
|
DateTimeOffset CreatedAt);
|