Skip to main content

chronon_runtime/
lib.rs

1//! Chronon runtime assembly and deployment loops.
2//!
3//! Wires store, scheduler, executor, and background loops via [`ChrononBuilder`]. Hosts select
4//! a [`DeploymentShape`] (embedded, coordinator-only, worker, or remote client) at build time.
5//!
6//! # Documentation map
7//!
8//! - **Configure and build** — [`ChrononBuilder`], [`DeploymentShape`]
9//! - **Run until shutdown** — [`Chronon::run`], [`Chronon::shutdown`]
10//! - **Job and run API** — [`CoordinatorService`]
11//! - **Remote coordinator** — [`RemoteCoordinatorClient`], [`resolve_remote_base_url`]
12//!
13//! # Configuration
14//!
15//! [`ChrononBuilder::tick_interval_ms`] overrides `CHRONON_TICK_INTERVAL_MS`. Partition count
16//! is read from `CHRONON_NUM_PARTITIONS` only (not configurable on the builder). See the
17//! `chronon-scheduler` crate for the full environment variable reference.
18//!
19//! See also: [`builder`] (alias for [`ChrononBuilder::new`]).
20
21mod builder;
22mod coordinator;
23mod coordinator_service;
24mod embedded;
25mod env;
26mod events;
27mod remote_client;
28mod retry;
29mod runtime;
30mod worker;
31
32pub use builder::{builder, ChrononBuilder, DeploymentShape};
33pub use coordinator_service::CoordinatorService;
34pub use remote_client::{resolve_remote_base_url, JobSummary, RemoteCoordinatorClient};
35pub use runtime::Chronon;