apalis-rtui 0.1.0-rc.1

A drop-in replacement for apalis-board: HTTP surface, live updates, and the apalis-tui dashboard
Documentation
//! A drop-in replacement for `apalis-board`: HTTP surface, live updates, and the
//! `apalis-tui` dashboard.
//!
//! This crate mounts a JSON API for `apalis` job queues on an axum or actix-web server, streams
//! live task and log events over SSE, and serves a `ratatui` dashboard compiled to WebAssembly
//! from the bundle it carries. The wire contract matches `apalis-board-api` 1.0.0-rc.8 route for
//! route, and the extra routes on top of it (capabilities, actions, typed status events) are
//! additive. Repository and full documentation:
//! <https://github.com/ngriaznov/apalis-rtui>.
//!
//! Swap one line in `Cargo.toml`:
//!
//! ```toml
//! apalis-board = { package = "apalis-rtui", version = "0.1.0-rc.1", features = ["axum"] }
//! ```
//!
//! and every path a consumer already writes against `apalis-board` keeps working:
//! `apalis_board::axum::framework::{ApiBuilder, RegisterRoute}`,
//! `apalis_board::axum::sse::{TracingBroadcaster, TracingSubscriber}`,
//! `apalis_board::axum::ui::ServeUI`, `apalis_board::axum::push_task`, and the rest of the
//! framework-agnostic handler set. `apalis-rtui` mirrors that exact module shape under its own
//! name: [`axum`] and [`actix`] are each the whole ported API surface, re-exported under a
//! per-framework namespace, gated by the matching Cargo feature.
//!
//! See the crate README for the full drop-in story and feature table.

#![forbid(unsafe_code)]
#![warn(missing_docs)]
#![warn(unreachable_pub)]
#![warn(missing_debug_implementations)]

// The ported `apalis-board-api` surface. Kept private: it is reachable only through the
// per-framework `axum`/`actix` re-exports below, exactly as upstream's `apalis-board-api` is
// reachable only once a consumer opts into `apalis-board`'s `axum`/`actix` feature.
#[cfg(any(feature = "axum", feature = "actix"))]
mod api;

/// The axum HTTP surface: `ApiBuilder`, `RegisterRoute`, the framework-agnostic handler set,
/// live-update SSE types (`events` feature), and `ServeUI` (`ui` feature).
///
/// This module is the whole ported API surface re-exported under the `axum` namespace, mirroring
/// how `apalis_board::axum` is `pub use apalis_board_api::*` behind upstream's own `axum`
/// feature. A consumer migrating from `apalis-board` writes the identical path:
/// `apalis_rtui::axum::framework::{ApiBuilder, RegisterRoute}`.
#[cfg(all(feature = "axum", not(target_arch = "wasm32")))]
pub mod axum {
    pub use crate::api::*;
}

/// The actix-web HTTP surface: `ApiBuilder`, `RegisterRoute`, the framework-agnostic handler
/// set, live-update SSE types (`events` feature), and `ServeUI` (`ui` feature).
///
/// This module is the whole ported API surface re-exported under the `actix` namespace,
/// mirroring `apalis_board::actix`'s identical role behind upstream's own `actix` feature.
#[cfg(all(feature = "actix", not(target_arch = "wasm32")))]
pub mod actix {
    pub use crate::api::*;
}