2 releases
0.1.2 | Feb 17, 2022 |
---|---|
0.1.1 | Feb 16, 2022 |
#2217 in Database interfaces
310KB
6K
SLoC
co-redis
mco redis client
-
Redis client for mco coroutine runtime
-
example:
#Cargo.toml
mco-redis = "0.1"
use mco_redis::cmd;
use mco_redis::connector::RedisConnector;
use std::error::Error;
fn main() -> Result<(), Box<dyn Error>> {
let redis = RedisConnector::new("127.0.0.1:6379").connect()?;
redis.exec(cmd::Set("test", "value"))?;
if let Some(resp) = redis.exec(cmd::Get("test"))? {
assert_eq!(resp, "value");
}
Ok(())
}
Dependencies
~5–35MB
~480K SLoC