#kv #b-tree #key-value #sled

toboggan-kv

Toboggan-kv is an abstraction layer over multiple KV stores

3 releases

0.1.2 Feb 23, 2021
0.1.1 Feb 23, 2021
0.1.0 Feb 23, 2021

#2484 in Data structures


Used in keyplace

MIT/Apache

13KB
298 lines

toboggan-kv

Sled-flavored KV abstraction layer

let bta = BTreeAdapter::new();
braap(bta);

let tmpdir = tempfile::tempdir().unwrap();
let sa = SledAdapter::open(tmpdir.path()).unwrap();
braap(sa);

fn braap<T:Toboggan>( store: T ){
    let beasts = store.open_tree("beasts").unwrap();
    beasts.insert("meow", "cat").unwrap();
}

lib.rs:

Toboggan - sled flavored KV abstraction

let bta = BTreeAdapter::new();
braap(bta);

let tmpdir = tempfile::tempdir().unwrap();
let sa = SledAdapter::open(tmpdir.path()).unwrap();
braap(sa);

fn braap<T:Toboggan>( store: T ){
    let beasts = store.open_tree("beasts").unwrap();
    beasts.insert("meow", "cat").unwrap();
}

Dependencies

~2–10MB
~121K SLoC