(wip) create new driver for KeyDB

* move GC and prometheus aware storage functions to separate interfaces
This commit is contained in:
Lawrence, Rendall
2022-04-23 01:28:06 +03:00
parent a1ce79b003
commit 4131c64e89
8 changed files with 527 additions and 432 deletions

View File

@@ -2,19 +2,13 @@ package memory
import (
"testing"
"time"
"github.com/sot-tech/mochi/storage"
"github.com/sot-tech/mochi/storage/test"
)
func createNew() storage.PeerStorage {
ps, err := NewPeerStorage(Config{
ShardCount: 1024,
GarbageCollectionInterval: 10 * time.Minute,
PrometheusReportingInterval: 10 * time.Minute,
PeerLifetime: 30 * time.Minute,
})
ps, err := NewPeerStorage(Config{ShardCount: 1024})
if err != nil {
panic(err)
}