#in-memory #durable #storage #high-concurrency

app diskfire

非阻塞,闪电般的基于磁盘的日志记录器

1个不稳定版本

0.1.0 2022年5月2日

#2685数据库接口

Apache-2.0

4KB

diskfire

非阻塞,闪电般的基于磁盘的日志记录器

示例


fn main() {
    
    let path  = "loger";
    let buffer_size = 10_000;

    // Run
    let (jh, sender)  = FastLog::run(buffer_size, path);


    // NonBlcoknig Log
    let _ = sender.send(b"Record ....".to_vec());


    // copy
    let sender2 = sender.clone();


    // NonBlocking send from another thread
    std::thread::spawn(move || {
        let _ = sender2.send(b"Record ....".to_vec());
    });


    let _ = jh.join();

}

依赖项

~1.3–2MB
~38K SLoC