Crates.io | nolan |
lib.rs | nolan |
version | 0.1.1 |
source | src |
created_at | 2022-06-16 19:29:34.956074 |
updated_at | 2022-08-14 16:37:34.647712 |
description | Commitlog/WAL Implmentation and Powerful Abstractions |
homepage | |
repository | https://github.com/bdkiran/lucidmq |
max_upload_size | |
id | 607638 |
size | 32,601 |
Nolan is the base library that wraps and handles commitlog/WAL logic into a simplified API. To those who are not familiar, this is an append only data structure that supports random reads via an offset. This library is created the underlying persistence unit behind the LucidMQ project. It is somewhat generic and can be used in other projects that need to utilize a commitlog/WAL.
To prevent commitlog curruption, only a few commitlog methods are exposed to be used as client code.
pub fn main() {
let commit_log = Commitlog::new("test_dir".to_string(), 1000, 10000);
// Let's append data to our commitlog
commit_log.append("hello please".as_bytes());
//Lets lookup by offset the message we just appended
commit_log.read(0);
}