Crates.io | ffly-rs |
lib.rs | ffly-rs |
version | 0.0.6 |
source | src |
created_at | 2022-08-11 18:53:44.158096 |
updated_at | 2023-02-11 13:18:23.932369 |
description | A rust utility library for the Firefly key-value pair database. |
homepage | |
repository | |
max_upload_size | |
id | 643517 |
size | 32,116 |
A utility library to provide optimized queries for the Firefly library.
The crate can be found at crates.io ffly-rs.
use ffly_rs::FireflyStream;
static FIREFLY_ADDR: &'static str = "127.0.0.1:46600";
#[tokio::main]
async fn main() {
let mut firefly = FireflyStream::connect(FIREFLY_ADDR)
.await
.expect("Could not connect to Firefly server!");
firefly.default_ttl = 60 * 60 * 24 * 7; // 7 days
firefly
.new("key", "value")
.await
.expect("Could not create a new record!");
assert_eq!(
firefly
.get_value("key")
.await
.expect("Could not get value!"),
"value"
);
}