34 lines
729 B
Rust
34 lines
729 B
Rust
#![allow(dead_code)] // REMOVE THIS LINE after fully implementing this functionality
|
|
|
|
use std::fs::File;
|
|
use std::io::BufWriter;
|
|
use std::path::Path;
|
|
use std::sync::Arc;
|
|
|
|
use anyhow::Result;
|
|
use bytes::Bytes;
|
|
use crossbeam_skiplist::SkipMap;
|
|
use parking_lot::Mutex;
|
|
|
|
pub struct Wal {
|
|
file: Arc<Mutex<BufWriter<File>>>,
|
|
}
|
|
|
|
impl Wal {
|
|
pub fn create(_path: impl AsRef<Path>) -> Result<Self> {
|
|
unimplemented!()
|
|
}
|
|
|
|
pub fn recover(_path: impl AsRef<Path>, _skiplist: &SkipMap<Bytes, Bytes>) -> Result<Self> {
|
|
unimplemented!()
|
|
}
|
|
|
|
pub fn put(&self, _key: &[u8], _value: &[u8]) -> Result<()> {
|
|
unimplemented!()
|
|
}
|
|
|
|
pub fn sync(&self) -> Result<()> {
|
|
unimplemented!()
|
|
}
|
|
}
|