feat: add redis populate

This commit is contained in:
alban 2023-07-17 22:44:06 +02:00
parent 60121a01c2
commit fd9ad62278
2 changed files with 24 additions and 0 deletions

0
README.md Normal file
View File

View File

@ -0,0 +1,24 @@
///
/// $ cargo run --example populate_redis
///
use redis::{
//RedisResult,
Client,
Commands,
Connection,
};
fn do_something() -> redis::RedisResult<()> {
let client = Client::open("redis://127.0.0.1/")?;
let mut con: Connection = client.get_connection()?;
let _ = con.set("/clientkey", "/pl/0/")?;
let _ = con.set("/EDH/0", "[[1.0, 0.0, 0.0],\n [ 0.0, 1.0, 0.0],\n [ 0.0, 0.0, 1.0]]")?;
let _ = con.set("/kpps/0", "5000")?;
let _ = con.set("/intensity/0", "255")?;
Ok(())
}
fn main() {
_ = do_something();
}