feat: add batch create and server info APIs (#540)

This commit is contained in:
Levi authored and GitHub committed 2024-05-17 15:19:10 +08:00
1 parent 42a0b89d95
commit 68c40d7f3f
8 files changed
+112 -8

No files matched your search

+3 -1
View File
@@ -69,7 +69,9 @@ func (n *MemStorage) Setup(buckets []string) error {
func (n *MemStorage) Put(bucket string, key string, v any) error {
n.lock.Lock()
defer n.lock.Unlock()
memData[bucket][key] = v
if bucketData, ok := memData[bucket]; ok {
bucketData[key] = v
}
return nil
}