Adds Health Check API Endpoint
This commit is contained in:
11
storage_service/controller/health_checker_controller.py
Normal file
11
storage_service/controller/health_checker_controller.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from fastapi_utils.cbv import cbv
|
||||
|
||||
from fastapi_utils.inferring_router import InferringRouter
|
||||
|
||||
health_router = InferringRouter()
|
||||
|
||||
@cbv(health_router)
|
||||
class HealthCheckerController:
|
||||
@health_router.get("/health", status_code=200)
|
||||
def health(self) -> dict[str, str]:
|
||||
return {"status": "healthy"}
|
||||
Reference in New Issue
Block a user