Skip to main content

Module state

Module state 

Source
Expand description

Pluggable state backend (StateBackend trait + impls). State backend abstraction. Two concrete backends: InProcessBackend for embedded single-process runs, and ObjectStoreBackend for anything durable (local filesystem via file://, or S3/GCS/Azure).

Re-exports§

pub use backend::StateBackend;
pub use backend::StateBackendError;
pub use config::DiscoveryMode;
pub use config::StateBackendBuildError;
pub use config::StateBackendConfig;
pub use config::DEFAULT_VNODE_CAPACITY;
pub use in_process::InProcessBackend;
pub use object_store::ObjectStoreBackend;
pub use vnode::key_hash;
pub use vnode::owned_vnodes;
pub use vnode::round_robin_assignment;
pub use vnode::NodeId;
pub use vnode::VnodeRegistry;

Modules§

backend
The StateBackend trait: the single contract between streaming operators and the storage tier. Backends persist per-(vnode, epoch) partial-state blobs and expose an epoch_complete durability gate.
config
StateBackendConfig: tagged enum selecting the runtime state backend. Three shapes: in_process, local (filesystem path), object_store (s3/gcs/file url).
in_process
InProcessBackend — non-durable StateBackend backed by an in-memory hashmap. Used for tests and embedded single-process runs.
object_store
ObjectStoreBackend — durable partial-state storage backed by any object_store implementation (S3, GCS, Azure, LocalFileSystem).
vnode
VnodeRegistry — runtime-configurable virtual node topology.