feat: manual health check

This commit is contained in:
Nicolas Meienberger
2025-09-27 11:09:19 +02:00
parent 082192f38a
commit 7154dcdbac
9 changed files with 142 additions and 7 deletions

View File

@@ -16,6 +16,7 @@ import {
unmountVolumeDto,
updateVolumeBody,
updateVolumeDto,
healthCheckDto,
} from "./volume.dto";
import { volumeService } from "./volume.service";
@@ -112,4 +113,10 @@ export const volumeController = new Hono()
const { error, status } = await volumeService.unmountVolume(name);
return c.json({ error, status }, error ? 500 : 200);
})
.post("/:name/health-check", healthCheckDto, async (c) => {
const { name } = c.req.param();
const { error, status } = await volumeService.checkHealth(name);
return c.json({ error, status }, 200);
});