# Functions
AddItemPipe cuckoofilter中设置物品,注意如果不设置NX则会重复向表中插入数据,返回全部为false,尽量带nx插入@params key string 使用的key@params item string 要插入的物品@params opts ...optparams.Option[AddOpts] 设置add行为的附加参数@returns bool 设置的物品是否已经存在,true表示已经存在,不会插入.
AddWithoutNX 设置cuckoofilter中只存在不存在都会添加.
AddWithhRefreshTTL 设置总是刷新,pipeline中无效.
AddWithRefreshTTLAtFirstTime 设置第一次创建key时使用MaxTTL设置过期,pipeline中无效.
AddWithTTL 设置总是使用指定的ttl刷新key.
AddWithTTLAtFirstTime 设置第一次创建key时使用指定的ttl设置过期,pipeline中无效.
CountItemPipe cuckoofilter中检查item存在的个数@params key string 使用的key@params item string@return int64 计数item的个数,如果报错则返回0.
DelItemPipe cuckoofilter中检查item存在的个数@params key string 使用的key@params item string@return bool item是否删除成功,true为删除成功,false表示不存在item无法删除.
ExistsItemPipe cuckoofilter中检查是否已经存在@params key string 使用的key@params item string 待检查的物品@return bool 物品是否已经存在.
InfoPipe 查看指定cuckoofilter的状态@params key string 使用的key.
InsertPipe 向一个cuckoofilter中插入数据,如果不存在则创建@params key string 使用的key@params items []string 待插入物品@params opts ...optparams.Option[InsertOpts] 可选设置项.
InsertWithCapacity 容量,预估物品的数量.当过滤器已经存在时用于创建过滤器.容量越大检索效率越低,但如果超出容量则会默认使用子过滤器扩容,这对检索效率的影响更大.当`NOCREATE`存在时这个设置将失效.
InsertWithExpansion 当达到容量时进行扩容.
InsertWithNoCreate 如果过滤器不存在则不创建它.这可以用于过滤器创建和过滤器添加之间需要严格分离的地方.`NOCREATE`的优先级高于`CAPACITY`和`ERROR`.
InsertWithoutNX 设置cuckoofilter中无论存在不存在物品都进行插入.
InsertWithhRefreshTTL 设置总是刷新.
InsertWithRefreshTTLAtFirstTime 设置第一次创建key时使用MaxTTL设置过期.
InsertWithTTL 设置总是使用指定的ttl刷新key.
InsertWithTTLAtFirstTime 设置第一次创建key时使用指定的ttl设置过期.
MAddItemPipe cuckoofilter中设置多个物品,使用的是INSERT或者INSERTNX命令注意如果不设置NX则会重复向表中插入数据,返回全部为false,尽量带nx插入@params key string 使用的key@params item []string 要插入的物品@params opts ...optparams.Option[AddOpts] 设置add行为的附加参数@returns map[string]bool 设置的物品是否在设置前已经存在,true表示已经存在,并未插入.
MExistsItemPipe cuckoofilter中检查复数物品是否已经存在@params key string 使用的key@params item ...string 待检查的物品@return map[string]bool 检查的物品是否已经存在.
New 创建一个新的令牌桶对象@params cli redis.UniversalClient@params opts ...optparams.Option[Options] 设置对象的可选参数.
ReservePipe 创建一个cuckoofilter,如果有设置maxttl,则会同时为其设置一个过期@params key string 使用的key@params capacity int64 容量,预估物品的数量,容量越大检索效率越低,但如果超出容量则会默认使用子过滤器扩容,这对检索效率的影响更大@params opts ...optparams.Option[ReserveOpts] 可选设置项.
ReserveWithBucketsize 每个存储桶中的项目数.较高的桶大小值会提高填充率,但也会导致更高的错误率和稍慢的性能.
ReserveWithExpansion 当达到容量时进行扩容.
ReserveWithMaxIterations 在声明过滤器已满并创建附加过滤器之前尝试在存储桶之间交换项目的次数.较低的值对性能更好,较高的值对过滤器填充率更好.
ReserveWithhRefreshTTL 设置使用maxttl设置key的过期,pipeline无效.
ReserveWithTTL 设置使用指定的ttl设置key的过期.
WithAutoRefreshInterval 设置自动刷新过期时间的设置.
WithKey 中间件通用设置,指定使用的键,注意设置后namespace依然有效.
WithMaxTTL 设置token消减间隔时长,单位s.
WithMiddlewaretype 设置中间件类型.
WithNamespace 中间件通用设置,指定锁的命名空间.
WithSpecifiedKey 中间件通用设置,指定使用的键,注意设置key后namespace将失效.
WithTaskCron 设置定时器.
# Variables
No description provided by the author
# Structs
AddOpt filter添加元素物品的参数.
CuckooFilter 布谷鸟过滤器对象[布谷鸟过滤器](https://www.cs.cmu.edu/~dga/papers/cuckoo-conext2014.pdf)常用于去重场景,其原理来自[cuckoo hash](https://en.wikipedia.org/wiki/Cuckoo_hashing)这种算法.这种算法的特点可以总结为`鸠占鹊巢`.最原始的布谷鸟哈希方法是使用两个哈希函数对一个key进行哈希,得到桶中的两个位置,此时1.
CuckoofilterInfo cuckoofilter状态信息.
No description provided by the author
No description provided by the author
Options broker的配置.
No description provided by the author