An open API service indexing awesome lists of open source software.

https://github.com/oli51467/simple-godis

基于Golang实现Redis服务器,支持RESP协议
https://github.com/oli51467/simple-godis

golang redis redis-server tcp-server

Last synced: 10 months ago
JSON representation

基于Golang实现Redis服务器,支持RESP协议

Awesome Lists containing this project

README

          

### 使用Go语言实现Redis

- 通信协议:```Redis Serialization Protocol```
- Go版本 ```1.17```

#### 技术栈

- Epoll
- TCP
- GC
- HashMap
- 协程
- 锁
- defer

#### 实现

- 使用TCP协议的应用层服务器
- Redis协议解析器
- 内存数据库
- Redis持久化
- Redis集群

#### 指令

- Keys

```keys```
```exists```
```del```
```type```
```rename```
```renamenx```
```flush```

- Strings

```get```
```set```
```getset```
```strlen```
```setnx```
```getdel```
```append```
```incr```
```decr```

- Common

```ping```
```exit```

- Set

```sAdd```
```sIsMember```
```sRem```
```sMembers```
```sCard```
```sInter```
```sUnion```
```sDiff```
```sPop```

- List

```lpush```
```lpushx```
```rpush```
```rpushx```
```lpop```
```rpop```
```lindex```
```lset```
```lrange```
```lrem```
```llen```

- Hash

```hset```
```hsetnx```
```hget```
```hdel```
```hexists```
```hmset```
```hmget```
```hmdel```
```hkeys```
```hvalues```
```hgetall```
```hlen```
```hstrlen```