hubvault.server.routes.maintenance
Maintenance route factory for hubvault.server.
This module exposes repository verification, storage-analysis, and operator-triggered maintenance endpoints over HTTP so the bundled frontend can render diagnostics and run controlled maintenance actions without importing backend internals.
The module contains:
create_maintenance_router()- Build the/api/v1/maintenancerouter
create_maintenance_router
- hubvault.server.routes.maintenance.create_maintenance_router(*, api=None, api_factory=None, authorizer)[source]
Build the maintenance router for the server app.
- Parameters:
api (Optional[hubvault.api.HubVaultApi]) – Optional repository API reused by the router
api_factory (Optional[Callable[[], hubvault.api.HubVaultApi]]) – Optional zero-argument factory returning one fresh repository API per request
authorizer (hubvault.server.auth.TokenAuthorizer) – Shared token authorizer
- Returns:
Router exposing read-only maintenance endpoints
- Return type:
fastapi.APIRouter
- Raises:
hubvault.optional.MissingOptionalDependencyError – Raised when the API extra is not installed.
TypeError – Raised when both
apiandapi_factoryare provided or when neither input is provided.