apalis-rtui-types 0.1.0-rc.1

Wire types shared between apalis-rtui's HTTP surface, TUI backend, and testkit
Documentation

apalis-rtui-types

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

What this crate is

apalis-rtui is a drop-in replacement for apalis-board. Its wire contract for the routes apalis-board already shipped has to stay byte-identical, so this crate re-exports apalis-board-types in full: LogEntry, LogLevel, LineEntry, EntryType, ResultEntry, Entry, Span, ApiError, and the config module are the same types. A value built against apalis-board-types and a value built against apalis-rtui-types share a TypeId, so a consumer holding both crates can pass one where the other is expected.

On top of that contract, this crate adds the wire types apalis-rtui's new routes need:

  • Capabilities / CapabilityMap: which optional actions a queue's backend supports.
  • RetryMode, ActionOutcome, BulkAction, BulkRequest, BulkFailure, BulkOutcome: the request and response shapes for the action routes.
  • TaskStatusEvent: the task-status event on the /events/status SSE stream.
  • RescheduleRequest, UpdateRequest: request bodies for the reschedule and update actions.

Usage

[dependencies]
apalis-rtui-types = "0.1.0-rc.1"
use apalis_rtui_types::{Capabilities, LogEntry};

let caps = Capabilities {
    vacuum: true,
    ..Capabilities::default()
};
let entry = LogEntry::default();

Most consumers reach these types through apalis-rtui itself. This crate stands on its own so a client (the apalis-tui dashboard, a hand-rolled TUI, an integration test) can depend on the wire contract without pulling in an HTTP framework.

License

Licensed under either of Apache License, Version 2.0 or the MIT license at your option.