aboutsummaryrefslogtreecommitdiff
path: root/redisDB.go
diff options
context:
space:
mode:
Diffstat (limited to 'redisDB.go')
-rw-r--r--redisDB.go9
1 files changed, 0 insertions, 9 deletions
diff --git a/redisDB.go b/redisDB.go
index 939fbbe..cde14d0 100644
--- a/redisDB.go
+++ b/redisDB.go
@@ -2,7 +2,6 @@ package main
import (
"fmt"
- "sync"
"time"
)
type Item struct {
@@ -11,19 +10,11 @@ type Item struct {
}
type RedisDB struct {
- mu sync.Mutex
shards []*Shard
}
type SimpleString string
-func (db *RedisDB) Execute(key string, fn func(*Shard) interface{}) interface{} {
- shard := db.getShard(key)
- shard.mu.Lock()
- defer shard.mu.Unlock()
- return fn(shard)
-}
-
func serializeRESP(v any) []byte {
switch val := v.(type) {
case string: