# Functions
CountItemPipe topk中检查item的计数,注意这个计数永远不会高于实际数量并且可能会更低.@params key string 使用的key@params item string 要检查的物品@return *redisbloomhelper.OneInt64MapPlacehold item对应的计数的占位符,使用`.Result()`获取值.
IncrItemPipe 为物品添加计数@params key string 使用的key@params item string 物品及其对应的增量@returns *redisbloomhelper.StringListValPlacehold 新增后被挤出队列的物品的占位符,使用`.Result()`获取值.
IncrWithIncrement IncrItem专用,为物品设置增量.
IncrWithIncrItems MincrItem专用,使用IncrItems的列表设置items,使用该参数标明将执行incrby而非add,因此不能和IncrWithItems混用 注意增量小于1会被调整为1.
IncrWithItemMap MincrItem专用,使用字段形式设置items,使用该参数标明将执行incrby而非add,因此不能和IncrWithItems混用 注意增量小于1会被调整为1.
IncrWithItems MincrItem专用,设置items并且不添加增量,使用该参数标明将执行add而非incrby,因此不能和IncrWithItemMap以及IncrWithIncrItems混用.
IncrWithhRefreshTTL 设置总是刷新.
IncrWithTTL 设置总是使用指定的ttl刷新key.
InfoPipe 查看指定TopK的状态@params key string 使用的key.
InitPipe 初始化TopK@params key string 使用的key@params topk int64 结构保存的topk@params opts ...optparams.Option[InitOpts] 可选参数.
InitWithDecay 使用概率方式初始化.
InitWithDepth 使用概率方式初始化.
InitWithhRefreshTTL 设置使用maxttl设置key的过期,pipeline无效.
InitWithTTL 设置使用指定的ttl设置key的过期.
InitWithWidth 使用概率方式初始化.
ListPipe 列出全部topk物品@params key string 使用的key.
ListWithCountPipe 列出全部topk物品及其对应的权重@params key string 使用的key.
MCountItemPipe topk中检查item的计数,注意这个计数永远不会高于实际数量并且可能会更低.@params key string 使用的key@params items ...string 要检查的物品@return *redisbloomhelper.Int64MapPlacehold item对应的计数的占位符,使用`.Result()`获取值.
MIncrItemPipe 为物品添加计数@params key string 使用的key@params opts ...optparams.Option[IncrOpts] 请求设置项,请使用`IncrWithItems`或`IncrWithItemMap`或`IncrWithIncrItems`设置物品及其增量@returns *redisbloomhelper.StringListValPlacehold 新增后被挤出队列的物品的占位符,使用`.Result()`获取值.
MQueryItemPipe 查看物品当前是否在topk序列@params key string 使用的key@params items ...string 待查看物品@returns *redisbloomhelper.BoolMapPlacehold 物品:是否在topk序列的占位符,使用`.Result()`获取值.
New 创建一个topk对象@params cli redis.UniversalClient@params opts ...optparams.Option[Options].
QueryItemPipe 查看物品当前是否在topk序列@params key string 使用的key@params item ...string 待查看物品@returns *redisbloomhelper.OneBoolMapPlacehold 是否在topk序列(true为在)的占位符,使用`.Result()`获取值.
WithAutoRefreshInterval 设置自动刷新过期时间的设置.
WithInitProbability cms专用,创建cms对象时使用prob方式初始化对应的key.
WithKey 中间件通用设置,指定使用的键,注意设置后namespace依然有效.
WithMaxTTL 设置token消减间隔时长,单位s.
WithMiddlewaretype 设置中间件类型.
WithNamespace 中间件通用设置,指定锁的命名空间.
WithSpecifiedKey 中间件通用设置,指定使用的键,注意设置key后namespace将失效.
WithTaskCron 设置定时器.
# Variables
No description provided by the author
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Options broker的配置.
TopK TopK对象,用于统计大量数据下的前几位有哪些比较常见的场景比如大量数据情况下的排行榜应用使用了算法[HeavyKeeper](https://www.usenix.org/system/files/conference/atc18/atc18-gong.pdf).其基本原理是使用一个shape为(width,depth)的表保存物品的签名和计数,通过hash函数将签名和计数更新进表,并同时使用指数衰减的方法淘汰小流量数据取的时候取其中的最大值作为物品的计数注意,和两个filter不同,cms必须先创建,incr不会创建cms结构,可以先创建再调用init方法初始化,也可以创建时使用对应的可选参数同步初始化.
TopKInfo TopK状态信息.