1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//! # kojin
//!
//! Async distributed task queue for Rust — the equivalent of Celery (Python),
//! BullMQ (Node.js), Sidekiq (Ruby), and Machinery (Go).
//!
//! This is the main facade crate. It re-exports types from [`kojin_core`],
//! the `#[task]` proc-macro from [`kojin_macros`], and optionally the Redis
//! broker from [`kojin_redis`].
//!
//! ## Features
//!
//! - Async-first worker runtime built on Tokio
//! - `#[kojin::task]` proc-macro for defining tasks
//! - Pluggable broker trait (Redis included)
//! - Composable middleware (tracing, metrics)
//! - Workflow orchestration: chain, group, chord
//! - Result backends (memory, Redis, PostgreSQL)
//! - Graceful shutdown, weighted queues, configurable retries
//!
//! ## Quick Start
//!
//! ```rust,no_run
//! use kojin::{KojinBuilder, MemoryBroker};
//!
//! # #[tokio::main]
//! # async fn main() {
//! let broker = MemoryBroker::new();
//! let worker = KojinBuilder::new(broker)
//! .concurrency(4)
//! .queues(vec!["default".into()])
//! .build();
//! worker.run().await;
//! # }
//! ```
// Re-export everything from kojin-core
pub use *;
// Re-export the task proc-macro
pub use task;
// Re-export Redis broker + result backend when feature is enabled
pub use ;
// Re-export PostgreSQL result backend when feature is enabled
pub use PostgresResultBackend;
// Re-export AMQP broker when feature is enabled
pub use ;
// Re-export SQS broker when feature is enabled
pub use ;
// Re-export dashboard when feature is enabled
pub use ;
pub use KojinBuilder;