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
Marc Cataford 17781b0eb9
All checks were successful
/ Static Analysis (push) Successful in 1m5s
/ Tests (push) Successful in 52s
feat: add status command to query the basic status meta of services
2024-04-14 00:27:55 -04:00

19 lines
361 B
Python

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()