Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kezhengjie/redisclient
a cpp RedisClient based on hiredis_cluster
https://github.com/kezhengjie/redisclient
Last synced: 6 days ago
JSON representation
a cpp RedisClient based on hiredis_cluster
- Host: GitHub
- URL: https://github.com/kezhengjie/redisclient
- Owner: kezhengjie
- License: mit
- Created: 2021-09-09T04:42:19.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-09-09T09:04:53.000Z (over 3 years ago)
- Last Synced: 2024-12-25T03:22:24.657Z (10 days ago)
- Language: C
- Size: 1.31 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RedisClient
A c++ RedisClient based on hiredis_cluster,used for redis cluster .## connect
```c++
RedisClient rc("127.0.0.1:8000,127.0.0.1:8001");
if (rc.err)
{
//handle error
return 1;
}
```## command
```c++
RedisReply* r = rc.command("set foo bar");
// whenever there's an error,both RedisReply* r and RedisClient rc's err field is larget
// than zero and they are the same.if(rc.err){
// handle err
std::cout << rc.errstr << std::endl;
}else{
println("type is:");
println(r->GetTypeStr());
if (r->GetStrSize() > 0)
println(r->GetStr());
}
```