boson_core/lib.rs
1//! Shared types, [`QueueBackend`] trait, router, and identity hooks.
2//!
3//! Task authors usually start with [`boson`](https://docs.rs/uf-boson). This crate holds
4//! shared DTOs, the [`QueueBackend`] trait, and identity types used by runtime and backend adapters.
5//!
6//! ## Entry points
7//!
8//! - [`Job`], [`Run`], [`TaskConfig`], [`ExecutionContext`] — portable data and handler context
9//! - [`QueueBackend`] — persistence trait for jobs, runs, config, leases (**Developing the backend**)
10//! - [`QueueRouter`] — register named backends at host boot (see
11//! [Getting started](https://docs.rs/uf-boson/latest/boson/index.html#getting-started) on `boson`)
12//!
13//! Hosts inject a `QueueBackend` implementation at build time; this crate has no I/O.
14
15pub mod backend;
16pub mod error;
17pub mod identity;
18pub mod models;
19pub mod router;
20
21pub use backend::{default_backend_from_global, JobEnqueueDisposition, QueueBackend};
22pub use error::{BosonError, IdentityError, Result};
23pub use identity::{ExecutionContext, ExecutionContextFactory, JsonExecutionContextFactory};
24pub use models::{
25 IdempotencyMode, Job, JobStatus, RateLimitPolicy, RetryPolicy, Run, RunStatus, TaskConfig,
26 TaskRunStats,
27};
28pub use router::QueueRouter;