aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authoralex <[email protected]>2026-07-09 19:46:48 +0200
committeralex <[email protected]>2026-07-09 19:46:48 +0200
commit5cdb2be53d630906bfdfdb97ade81f7602c9fa45 (patch)
tree6c9259771c18f12409718531522a86a89345e3a5 /main.go
parentb845271ad2e64bc128e3ef6a419d898edd4911c1 (diff)
downloadredis-clone-shards.tar.xz
redis-clone-shards.zip
refactored all handlers to work with shardsshards
Diffstat (limited to 'main.go')
-rw-r--r--main.go46
1 files changed, 23 insertions, 23 deletions
diff --git a/main.go b/main.go
index 54f2b38..84974cd 100644
--- a/main.go
+++ b/main.go
@@ -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() {