gocache just for learn redis design and go language
go cache just for learn redis design and golang
一样的代码。。。。go语言初学者,请勿吐槽!
功能点 | 进度 | 备注 |
---|---|---|
网络编程(Reactor) | 100% | linux epoll实现 |
Redis协议解析(支持RESP2/3) | 100% | 仅实现了部分类型,详见以下 |
多线程IO | 100% | |
string 常用操作 | 100% | |
hash 常用操作 | ||
aof持久化 | 90% | |
集群分布式 |
目前支持如下类型:
Type | Comment |
---|---|
Array | an ordered collection of N other types |
Blob string | binary safe strings |
Simple string | a space efficient non binary safe string |
Simple error | a space efficient non binary safe error code and message |
Number | an integer in the signed 64 bit range |
Null | RESP2.0 null |
忽略大小写
命令 | demo | 返回值 | 备注 | |
---|---|---|---|---|
ping | PONG | |||
quit | OK | |||
set | set truman truman | OK | ||
get | get truman | truman or null | ||
del | del truman | 1 or 0 | ||
exists | exists truman | 1 or 0 |
因为使用linux epoll,目前仅打算支持linux
经测试支持jedis,redis-cli等客户端