package
2.1.0
Repository: https://github.com/golang-tools/redishelper.git
Documentation: pkg.go.dev

# Functions

IncrItemPipe 为物品添加计数@params key string 目标key@params item string 要增加的物品@params opts ...optparams.Option[IncrOpts] 增加数据时的设置,可以使用`IncrWithIncrement`额外指定物品的增量@returns *redisbloomhelper.OneInt64MapPlacehold 物品在新增后的存量.
IncrWithIncrement IncrItem专用,为物品设置增量.
IncrWithIncrItems MincrItem专用,使用IncrItems的列表设置items,使用该参数标明将执行incrby,因此不能和IncrWithItems混用 注意增量小于1会被调整为1.
IncrWithItemMap MincrItem专用,使用字段形式设置items,使用该参数标明将执行incrby,因此不能和IncrWithItems混用 注意增量小于1会被调整为1.
IncrWithhRefreshTTL 设置总是刷新,pipeline中无效.
IncrWithTTL 设置总是使用指定的ttl刷新key.
InfoPipe 查看指定CountMinSketch的状态@params key string 目标key.
InitPipe 初始化CountMinSketch@params key string 目标key@params opts ...optparams.Option[InitOpts] 注意InitWithProbability和InitWithDIM必选一个,如果选了超过一个则会默认取第一个.
InitWithProbability 使用概率方式初始化.
InitWithProbability 使用概率方式初始化.
InitWithhRefreshTTL 设置使用maxttl设置key的过期,pipeline无效.
InitWithTTL 设置使用指定的ttl设置key的过期.
MergePipe pipeline中将几个CountMinSketch合并到指定的key@params key string 合并到的目标key@params sources []*WeightedCountMinSketchKey 用于merge的其他CountMinSketch和其设置的权重序列@params opts ...optparams.Option[InitOpts] 创建新CountMinSketch的设置,如果有设置则会先创建key再进行merge,否则认为key已经存在@returns *CountMinSketch 融合了自己和othersources信息的新CountMinSketch对象.
MIncrItemPipe 为物品添加计数@params key string 目标key@params opts ...optparams.Option[IncrOpts] 增加数据时的设置,请使用`IncrWithItemMap`或`IncrWithIncrItems`设置物品及其增量@returns *redisbloomhelper.Int64MapPlacehold 物品在新增后的存量.
MQueryItemPipe 查看物品当前计数@params key string 目标key@params items ...string 待查看物品@returns *redisbloomhelper.Int64MapPlacehold 物品在新增后的存量.
New 创建一个新的令牌桶对象@params cli redis.UniversalClient@params opts ...optparams.Option[Options] 设置对象的可选参数,注意 WithInitProbability 和 WithInitDIM如果有填只会取第一个.
QeryItemPipe 查看物品当前计数@params key string 目标key@params item string 代查看物品@returns *redisbloomhelper.OneInt64MapPlacehold 物品在新增后的存量.
WithAutoRefreshInterval 设置自动刷新过期时间的设置.
WithInitProbability cms专用,创建cms对象时使用prob方式初始化对应的key.
WithInitProbability cms专用,创建cms对象时使用prob方式初始化对应的key.
WithKey 中间件通用设置,指定使用的键,注意设置后namespace依然有效.
WithMaxTTL 设置token消减间隔时长,单位s.
WithMiddlewaretype 设置中间件类型.
WithNamespace 中间件通用设置,指定锁的命名空间.
WithSpecifiedKey 中间件通用设置,指定使用的键,注意设置key后namespace将失效.
WithTaskCron 设置定时器.

# Variables

No description provided by the author

# Structs

CountMinSketch count-min sketch对象(Count–min sketch](https://en.wikipedia.org/wiki/Count%E2%80%93min_sketch)算法是一个在数据大小非常大时使用的一种通过牺牲准确性提高的效率的计数算法.这个算法的原理是:不存储所有的不同的元素,只存储它们Sketch的计数.基本的思路如下:1.
CountMinSketchInfo CountMinSketch数据结构状态信息.
IncrOpts 是否刷新ttl的配置项.
No description provided by the author
No description provided by the author
Options broker的配置.
No description provided by the author
No description provided by the author