This repository has been archived on 2024-06-02. You can view files and clone it, but cannot push or open issues or pull requests.
spud-py/spud/daemon.py

20 lines
361 B
Python
Raw Normal View History

import fastapi
from spud.container_managers import PodmanManager, ServiceMetadata
app = fastapi.FastAPI()
manager = PodmanManager()
@app.get("/")
def alive():
"""Live check."""
return 200
@app.get("/status")
def check_service_statuses() -> list[ServiceMetadata]:
"""Reports on the status of all services."""
return manager.get_services()