We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2014773 commit 0622523Copy full SHA for 0622523
2 files changed
libsql-wal/src/lib.rs
@@ -10,6 +10,7 @@ pub mod shared_wal;
10
pub mod storage;
11
pub mod transaction;
12
pub mod wal;
13
+mod swap_strategy;
14
15
const LIBSQL_MAGIC: u64 = u64::from_be_bytes(*b"LIBSQL\0\0");
16
const LIBSQL_PAGE_SIZE: u16 = 4096;
libsql-wal/src/swap_strategy/mod.rs
@@ -0,0 +1,7 @@
1
+pub(crate) mod duration;
2
+pub(crate) mod frame_count;
3
+
4
+pub(crate) trait SwapStrategy: Sync + Send + 'static {
5
+ fn should_swap(&self, frames_in_wal: usize) -> bool;
6
+ fn swapped(&self);
7
+}
0 commit comments