mco-redis

Crates.iomco-redis
lib.rsmco-redis
version0.1.2
sourcesrc
created_at2022-02-16 07:46:18.32786
updated_at2022-02-17 12:43:29.062018
descriptionRust Redis Client for mco Coroutine
homepage
repository
max_upload_size
id533143
size338,333
zxj (zhuxiujia)

documentation

README

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(())
}
Commit count: 0

cargo fmt