Versions in this module Expand all Collapse all v2 v2.1.0 Jul 27, 2022 Changes in this version + var Defaultopt = Options + func IncrItemPipe(pipe redis.Pipeliner, ctx context.Context, key string, item string, ...) (*redisbloomhelper.OneInt64MapPlacehold, error) + func IncrWithIncrItems(incritems ...*redisbloomhelper.IncrItem) optparams.Option[IncrOpts] + func IncrWithIncrement(n int64) optparams.Option[IncrOpts] + func IncrWithItemMap(itemmap map[string]int64) optparams.Option[IncrOpts] + func IncrWithRefreshTTL() optparams.Option[IncrOpts] + func IncrWithTTL(t time.Duration) optparams.Option[IncrOpts] + func InitPipe(pipe redis.Pipeliner, ctx context.Context, key string, ...) (*redis.Cmd, error) + func InitWithDIM(width, depth int64) optparams.Option[InitOpts] + func InitWithProbability(error_rate, probability float64) optparams.Option[InitOpts] + func InitWithRefreshTTL() optparams.Option[InitOpts] + func InitWithTTL(t time.Duration) optparams.Option[InitOpts] + func MIncrItemPipe(pipe redis.Pipeliner, ctx context.Context, key string, ...) (*redisbloomhelper.Int64MapPlacehold, error) + func MQueryItemPipe(pipe redis.Pipeliner, ctx context.Context, key string, items ...string) (*redisbloomhelper.Int64MapPlacehold, error) + func MergePipe(pipe redis.Pipeliner, ctx context.Context, key string, ...) (*redis.Cmd, error) + func QueryItemPipe(pipe redis.Pipeliner, ctx context.Context, key string, item string) (*redisbloomhelper.OneInt64MapPlacehold, error) + func WithAutoRefreshInterval(autoRefreshInterval string) optparams.Option[Options] + func WithInitDIM(width, depth int64) optparams.Option[Options] + func WithInitProbability(error_rate, probability float64) optparams.Option[Options] + func WithKey(key string) optparams.Option[Options] + func WithMaxTTL(maxTTL time.Duration) optparams.Option[Options] + func WithMiddlewaretype(typename string) optparams.Option[Options] + func WithNamespace(ns ...string) optparams.Option[Options] + func WithSpecifiedKey(key string) optparams.Option[Options] + func WithTaskCron(taskCron *cron.Cron) optparams.Option[Options] + type CountMinSketch struct + func New(cli redis.UniversalClient, opts ...optparams.Option[Options]) (*CountMinSketch, error) + func (c *CountMinSketch) Clean(ctx context.Context) error + func (c *CountMinSketch) IncrItem(ctx context.Context, item string, opts ...optparams.Option[IncrOpts]) (int64, error) + func (c *CountMinSketch) Info(ctx context.Context) (*CountMinSketchInfo, error) + func (c *CountMinSketch) Init(ctx context.Context, opts ...optparams.Option[InitOpts]) error + func (c *CountMinSketch) InitFromSources(ctx context.Context, sources ...*WeightedCountMinSketch) error + func (c *CountMinSketch) MIncrItem(ctx context.Context, opts ...optparams.Option[IncrOpts]) (map[string]int64, error) + func (c *CountMinSketch) MQueryItem(ctx context.Context, items ...string) (map[string]int64, error) + func (c *CountMinSketch) Merge(ctx context.Context, weight int64, othersources []*WeightedCountMinSketch, ...) (*CountMinSketch, error) + func (c *CountMinSketch) QueryItem(ctx context.Context, item string) (int64, error) + type CountMinSketchInfo struct + Count int64 + Depth int64 + Width int64 + type IncrOpts struct + Increment int64 + MincrIncrement []int64 + MincrItems []string + RefreshOpts []optparams.Option[middlewarehelper.RefreshOpt] + type InfoPlacehold struct + Ck string + Cmd *redis.Cmd + func InfoPipe(pipe redis.Pipeliner, ctx context.Context, key string) *InfoPlacehold + func (r *InfoPlacehold) Result() (*CountMinSketchInfo, error) + type InitOpts struct + Depth int64 + ErrorRate float64 + Probability float64 + RefreshOpts []optparams.Option[middlewarehelper.RefreshOpt] + Width int64 + type Options struct + InitOpts []optparams.Option[InitOpts] + MiddlewareOpts []optparams.Option[middlewarehelper.Options] + Middlewaretype string + type WeightedCountMinSketch struct + Src *CountMinSketch + Weight int64 + type WeightedCountMinSketchKey struct + Key string + Weight int64