feat: backend status & health check

This commit is contained in:
Nicolas Meienberger
2025-09-03 22:18:59 +02:00
parent 63b983b1b1
commit 7fe75c64e8
12 changed files with 239 additions and 4 deletions

View File

@@ -1,3 +1,4 @@
import type { BackendStatus } from "@ironmount/schemas";
import type { Volume } from "../../db/schema";
import { makeDirectoryBackend } from "./directory/directory-backend";
import { makeNfsBackend } from "./nfs/nfs-backend";
@@ -5,6 +6,7 @@ import { makeNfsBackend } from "./nfs/nfs-backend";
export type VolumeBackend = {
mount: () => Promise<void>;
unmount: () => Promise<void>;
checkHealth: () => Promise<{ error?: string; status: BackendStatus }>;
};
export const createVolumeBackend = (volume: Volume): VolumeBackend => {