Seris is database server written in Golang inspired by Redis using serialization protocol specification (RESP).
.__
______ ___________|__| ______
/ ___// __ \_ __ \ |/ ___/
\___ \\ ___/| | \/ |\___ \
/____ >\___ >__| |__/____ >
\/ \/ \/
go run main.go
go build -o resis main.go
- Initialize seris server
package main
import (
"fmt"
"seris/seris"
)
func main() {
server, err := seris.NewServer(&seris.Config{
Port: 6379,
EnableAof: true,
AofFile: "database.aof",
})
if err != nil {
fmt.Println(err)
return
}
server.Listen()
}
- Connect to the server using a redis client
$ redis-cli
- Enable / Desable data save on dist
Config {
EnableAof: false
...
}
- PING
- SET
- GET
- DEL
- HSET
- HGET
- HGETALL
- HLEN
- HDEL