Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Filter ¶
type Filter interface { // Add // @Description: a key to filter // @param key // @return error Add(key []byte) error // ExistMult // @Description: Check more keys is/not exist // @param arr // @return []bool ExistMult(arr [][]byte) []bool // Exist // @Description: Check key is/not exist // @param key // @return bool // @return error Exist(key []byte) (bool, error) // AddMult // @Description: Add more key to filter // @param arr // @return error AddMult(arr [][]byte) error // SaveLastPoint // @Description: Save last point to server // @param pointK // @param pointV // @return error SaveLastPoint(pointK string, pointV string) error // GetLastPoint // @Description: get last point to server // @param pointK // @return []string // @return error GetLastPoint(pointK string) ([]string, error) }
Filter support add key , check key is/not exist
func NewBigFilter ¶
func NewBigFilter(n int, m uint, fpRate float64, redisServerCluster []string, pass *string, name string, logger protocol.Logger) ( Filter, error)
NewBigFilter 创建一个 bigFilter @Description: args: n 子过滤器个数,m 每个子过滤器容量,fpRate 过滤器误判概率 @param n @param m @param fpRate @param redisServerCluster @param pass @param name @param logger @return Filter @return error
Click to show internal directories.
Click to hide internal directories.