diff options
| author | alex <[email protected]> | 2026-07-09 19:46:48 +0200 |
|---|---|---|
| committer | alex <[email protected]> | 2026-07-09 19:46:48 +0200 |
| commit | 5cdb2be53d630906bfdfdb97ade81f7602c9fa45 (patch) | |
| tree | 6c9259771c18f12409718531522a86a89345e3a5 /main.go | |
| parent | b845271ad2e64bc128e3ef6a419d898edd4911c1 (diff) | |
| download | redis-clone-5cdb2be53d630906bfdfdb97ade81f7602c9fa45.tar.xz redis-clone-5cdb2be53d630906bfdfdb97ade81f7602c9fa45.zip | |
refactored all handlers to work with shardsshards
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 46 |
1 files changed, 23 insertions, 23 deletions
@@ -17,30 +17,30 @@ var db RedisDB type handlerFunc func(net.Conn, []string) var commandRegistry = map[string]handlerFunc{ - "GET": handleGet, - "SET": handleSet, - "DEL": handleDel, - "EXISTS": handleExists, + "GET": handleGet, + "SET": handleSet, + "DEL": handleDel, + "EXISTS": handleExists, "INCR": handleIncr, - "DECR": handleDecr, - "PING": handlePing, - "RENAME": handleRename, -/* "FLUSHALL": handleFlushall, - "RPUSH": handleRpush, - "LPUSH": handleLpush, - "LRANGE": handleLrange, - "LPOP": handleLpop, - "RPOP": handleRpop, - "EXPIRE": handleExpire, - "HSET": handleHset, - "HGET": handleHget, - "HGETALL": handleHgetall, - "HKEYS": handleHkeys, - "HVALUES": handleHvalues, - "TYPE": handleType, - "DBSIZE": handleDbsize, - "KEYS": handleKeys, - "LREM": handleLrem,*/ + "DECR": handleDecr, + "PING": handlePing, + "RENAME": handleRename, + "FLUSHALL": handleFlushall, + "RPUSH": handleRpush, + "LPUSH": handleLpush, + "LRANGE": handleLrange, + "LPOP": handleLpop, + "RPOP": handleRpop, + "EXPIRE": handleExpire, + "HSET": handleHset, + "HGET": handleHget, + "HGETALL": handleHgetall, + "HKEYS": handleHkeys, + "HVALUES": handleHvalues, + "TYPE": handleType, + "DBSIZE": handleDbsize, + "KEYS": handleKeys, + "LREM": handleLrem, } func main() { |
