Expand description
HTTP API surface for the queue. Mirrors the
tauri-plugin-queue command surface — the Tauri plugin will be
refactored to thin wrappers around the same handlers in a
follow-up. See Cargo.toml for the design rationale.
Public surface:
dto— request/response shapes shared across the Tauri and HTTP transports. Kept as apub modbecause callers tend to import many DTOs at once and the namespace is the discoverable contract.handlers— pure async fns over&Storage. Test these directly against an in-memorySQLite, no router or container needed.build_router— Axum router that exposes the handlers as JSON endpoints. Mount viaRouter::merge(forge_jobs_api::build_router(storage)).metrics_render— Prometheus text rendering helper.Error— handler errors that map to HTTP status codes viaaxum::response::IntoResponse.
Modules§
- dto
- Request/response shapes shared by the Tauri plugin and the HTTP transport.
- handlers
- Pure async fns over
&Storage.
Enums§
Functions§
- build_
router - Build the queue API router. Pass the shared
Storagebundle in; it’s cloned into request handlers via Axum’sStateextractor. - metrics_
render - Collect per-queue samples and render the Prometheus text body.