A weekend project implementing a partial, in-memory RESP2-compliant Redis server in Go. Implementation tested against the official go-redis client.
# Run without building
go run main.go
# Run Test
go test -v
# Build Docker Container
docker build -t go-redis-server:latest .
# Run the container
docker run -d -p 6379:6379 --name go-redis-server \
-e REDIS_PASSWORD=your_redis_password \
-e REDIS_PORT=6379 \
go-redis-server- Redis serialization protocol specification
- List of Redis Commands
- Offical Redis Go Client
- Test Containers
- AUTH - AUTH command on the client
- GET - Get value of a key
- SET - Set a value of a key
- DEL - Delete a key
- EXISTS - Check if key exists
- EXPIRE - Sets a keys expiration
- TTL - Get time to live of key
- RENAME - Rename a keys value
- APPEND - Append value to a key
- INCR - Increment value of key
- DECR - Decrement value of key
- PING - PONG!
- INFO - Debug info about the server.
- Theres no enforcement on integer overflows.
- No timeouts, very little validation of input. Theoretically commands can hang forever.
- There are several sub-operations on the commands that still need implementing.