mirror of
https://github.com/charlienet/go-mixed.git
synced 2025-07-18 00:22:41 +08:00
use redis
This commit is contained in:
@ -6,7 +6,7 @@ import (
|
||||
"github.com/charlienet/go-mixed/bytesconv"
|
||||
"github.com/charlienet/go-mixed/expr"
|
||||
"github.com/charlienet/go-mixed/hash"
|
||||
"github.com/go-redis/redis/v8"
|
||||
"github.com/charlienet/go-mixed/redis"
|
||||
)
|
||||
|
||||
const DEFAULT_SIZE = 2 << 24
|
||||
@ -26,13 +26,13 @@ type BloomFilter struct {
|
||||
}
|
||||
|
||||
type bloomOptions struct {
|
||||
redisClient *redis.Client
|
||||
redisClient redis.Client
|
||||
redisKey string
|
||||
}
|
||||
|
||||
type option func(*bloomOptions)
|
||||
|
||||
func WithRedis(redis *redis.Client, key string) option {
|
||||
func WithRedis(redis redis.Client, key string) option {
|
||||
return func(bo *bloomOptions) {
|
||||
bo.redisClient = redis
|
||||
bo.redisKey = key
|
||||
|
Reference in New Issue
Block a user