scanfinder

package
v0.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package scanfinder 使用scan遍历查询的工具

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Find

func Find(ctx context.Context, cli redis.UniversalClient, partten string, opts ...Option) ([]string, error)

Find 查询满足匹配的所有key

func FindOne

func FindOne(ctx context.Context, cli redis.UniversalClient, partten string, opts ...Option) (string, error)

FindOne 查询满足匹配的一个key

Types

type Option

type Option interface {
	Apply(*Options)
}

Option configures how we set up the connection.

func WithSetpSize

func WithSetpSize(stepsize int64) Option

WithMaxTTL 设置最大过期时间

type Options

type Options struct {
	StepSize int64
}

Option 设置key行为的选项 @attribute MaxTTL time.Duration 为0则不设置过期 @attribute AutoRefresh string 需要为crontab格式的字符串,否则不会自动定时刷新

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL