22 lines
494 B
Python
22 lines
494 B
Python
|
|
from fastapi import APIRouter
|
||
|
|
|
||
|
|
from app.models import HealthResponse
|
||
|
|
from app.services.runtime_probe import build_health
|
||
|
|
|
||
|
|
router = APIRouter(tags=['health'])
|
||
|
|
|
||
|
|
|
||
|
|
@router.get('/live', response_model=HealthResponse)
|
||
|
|
def live() -> HealthResponse:
|
||
|
|
return build_health()
|
||
|
|
|
||
|
|
|
||
|
|
@router.get('/ready', response_model=HealthResponse)
|
||
|
|
def ready() -> HealthResponse:
|
||
|
|
return build_health()
|
||
|
|
|
||
|
|
|
||
|
|
@router.get('/health', response_model=HealthResponse)
|
||
|
|
def health() -> HealthResponse:
|
||
|
|
return build_health()
|