spate_core/lib.rs
1//! The engine of the Spate framework.
2//!
3//! `spate-core` contains the pipeline runtime and every technology-neutral
4//! abstraction: records and their checkpoint tokens, the operator chain,
5//! the source and sink traits, checkpointing, backpressure, configuration
6//! loading, metrics, and the admin server.
7//!
8//! Applications should depend on the [`spate`](https://crates.io/crates/spate)
9//! facade crate rather than on `spate-core` directly.
10//!
11//! The architecture and its invariants are documented in `docs/DESIGN.md`;
12//! the metric taxonomy in `docs/METRICS.md`.
13
14// tokio's own sources change shape under `--cfg loom` (net disappears), so
15// anything touching tokio::net is compiled out of loom model builds.
16#[cfg(not(loom))]
17pub mod admin;
18/// Re-export of the [`bytes`] crate: [`RowEncoder`](sink::RowEncoder)
19/// signatures take [`bytes::BytesMut`], so connector authors can use this
20/// re-export instead of declaring their own `bytes` dependency (declaring
21/// one is also fine — versions are compatible per the workspace pin).
22pub use bytes;
23
24pub mod backpressure;
25pub mod checkpoint;
26// Resolves the reserved `chunk:` block into `ops::ChunkConfig`, so it follows
27// `ops` out of loom model builds (nothing loom-modelled reads config).
28#[cfg(not(loom))]
29pub mod config;
30// References `source` types, so it shares the source module's loom gate.
31#[cfg(not(loom))]
32pub mod coordination;
33pub mod deser;
34pub mod error;
35pub mod framing;
36pub mod metrics;
37#[cfg(not(loom))]
38pub mod ops;
39#[cfg(not(loom))]
40pub mod pipeline;
41pub mod record;
42#[cfg(not(loom))]
43pub mod sink;
44#[cfg(not(loom))]
45pub mod source;
46pub mod telemetry;
47
48pub use error::{DeserError, ErrorClass, ErrorPolicy, FatalError, SinkError, SourceError};
49pub use framing::FramingContract;
50pub use record::{Flow, PartitionId, RawPayload, Record, RecordMeta};