1
0
mirror of https://github.com/charlienet/go-mixed.git synced 2025-07-18 08:32:40 +08:00

添加存储

This commit is contained in:
2022-10-10 11:07:59 +08:00
parent f043d2e5a7
commit 716a199c9b
8 changed files with 323 additions and 62 deletions

24
bloom/redis_store_test.go Normal file
View File

@ -0,0 +1,24 @@
package bloom
import (
"testing"
"github.com/go-redis/redis/v8"
)
func TestRedisStore(t *testing.T) {
client := redis.NewClient(&redis.Options{
Addr: "192.168.2.222:6379",
Password: "123456",
})
store := newRedisStore(client, "abcdef", 10000)
err := store.Set(1, 2, 3, 9, 1223)
if err != nil {
t.Fatal(err)
}
t.Log(store.Test(1))
t.Log(store.Test(1, 2, 3))
t.Log(store.Test(4, 5, 8))
}