1pub mod error;
2
3mod basins;
4pub mod bgtasks;
5mod core;
6mod durability_notifier;
7mod read;
8mod store;
9mod streamer;
10mod streams;
11
12mod append;
13mod kv;
14mod stream_id;
15
16pub use core::Backend;
17
18pub const FOLLOWER_MAX_LAG: usize = 25;
19
20#[derive(Debug, Clone, PartialEq, Eq)]
21pub enum CreatedOrReconfigured<T> {
22 Created(T),
23 Reconfigured(T),
24}
25
26impl<T> CreatedOrReconfigured<T> {
27 pub fn is_created(&self) -> bool {
28 matches!(self, Self::Created(_))
29 }
30
31 pub fn into_inner(self) -> T {
32 match self {
33 Self::Created(v) | Self::Reconfigured(v) => v,
34 }
35 }
36}