Skip to main content

Crate apalis_rtui_types

Crate apalis_rtui_types 

Source
Expand description

Wire types shared between apalis-rtui’s HTTP surface, TUI backend, and testkit.

This crate re-exports the apalis-board-types wire contract byte-identically and adds the wire-side types apalis-rtui needs beyond it. It carries no HTTP framework, no apalis-core dependency, and no runtime, so the server, the native dashboard, and the wasm dashboard all share one definition of every JSON shape. Repository: https://github.com/ngriaznov/apalis-rtui.

§Re-exported from apalis-board-types

LogEntry, LogLevel, LineEntry, EntryType, ResultEntry, Entry, Span, ApiError, and the config module are the exact types a consumer already holding apalis-board-types has. A value built against one crate deserializes and compares equal against the other: same struct, same TypeId, not a lookalike.

§New in this crate

Capabilities and CapabilityMap describe which optional backend actions a queue supports. RetryMode, ActionOutcome, BulkAction, BulkRequest, BulkFailure, and BulkOutcome cover the request/response shapes of the action routes. TaskStatusEvent is the task-status SSE event shape, and ActivityBucket is one minute of its GET /events/activity rollup. RescheduleRequest and UpdateRequest are request bodies for the reschedule and update actions.

§wire

The wire module holds hand-written, apalis-core-free mirrors of the QueueInfo, RunningWorker, Statistic, and Task JSON shapes, re-exported at the crate root so both apalis-rtui and apalis-tui (including its wasm32 build) share one definition. See the module’s own docs for why log frames reuse LogEntry/Span instead of a third copy.

Re-exports§

pub use wire::LogFrameExt;
pub use wire::Parts;
pub use wire::QueueInfo;
pub use wire::RunningWorker;
pub use wire::Statistic;
pub use wire::TaskJson;

Modules§

config
Configuration module.
wire
Hand-written mirrors of the JSON shapes apalis-core’s QueueInfo, RunningWorker, Statistic, and Task serialize to, plus an extension trait for the log-frame shape.

Structs§

ActivityBucket
One minute-bucket of task.start/task.done/task.failed counts, as served by GET /events/activity (docs/PLAN.md §6.2).
BulkFailure
One failed entry in a BulkOutcome.
BulkOutcome
The result of a bulk action: every id sequentially attempted, split by outcome.
BulkRequest
The body of POST /queues/{queue}/tasks/bulk.
Capabilities
Which optional actions a queue’s registered backend supports.
Entry
A log entry.
LineEntry
A line entry.
LogEntry
A log entry.
RescheduleRequest
The body of PATCH /queues/{queue}/tasks/{task_id}/reschedule.
ResultEntry
A result entry.
Span
Information about a tracing span.
TaskStatusEvent
A task-status event on the /events/status SSE stream.
UpdateRequest
The body of PATCH /queues/{queue}/tasks/{task_id}.

Enums§

ActionOutcome
The result of a single action route.
ApiError
An enumeration of possible API errors.
BulkAction
Which action a bulk request applies to every listed task id.
EntryType
Additional information about a log entry.
LogLevel
The log level of a log entry.
RetryMode
How a retry action was carried out.

Type Aliases§

CapabilityMap
One Capabilities entry per queue name, as served by GET /capabilities.