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
64
65
66
67
68
69
70
//! OpenData Log - A key-oriented log system built on SlateDB.
//!
//! OpenData Log provides a simple log abstraction where each key represents an
//! independent log stream. Unlike traditional messaging systems with partitions,
//! users write directly to keys and can create new keys as access patterns evolve.
//!
//! # Architecture
//!
//! The log is built on SlateDB's LSM tree. Writes append entries to the WAL and
//! memtable, then flush to sorted string tables (SSTs). LSM compaction naturally
//! organizes data for log locality, grouping entries by key prefix over time.
//!
//! # Key Concepts
//!
//! - **LogDb**: The main entry point providing both read and write operations.
//! - **LogDbReader**: A read-only view of the log, useful for consumers that should
//! not have write access.
//! - **Sequence Numbers**: Each entry is assigned a global sequence number at
//! append time. Sequence numbers are monotonically increasing within a key's
//! log but not contiguous (other keys' appends are interleaved).
//!
//! # Example
//!
//! ```ignore
//! use log::{LogDb, Config, Record};
//! use bytes::Bytes;
//!
//! // Open a log
//! let log = LogDb::open(Config::default()).await?;
//!
//! // Append records
//! let records = vec![
//! Record { key: Bytes::from("orders"), value: Bytes::from("order-123") },
//! ];
//! log.try_append(records).await?;
//!
//! // Scan a key's log
//! let mut iter = log.scan(Bytes::from("orders"), ..);
//! while let Some(entry) = iter.next().await? {
//! println!("seq={}, value={:?}", entry.sequence, entry.value);
//! }
//! ```
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
// Re-export proto types for use by clients