redis

package
v0.0.0-...-5510fa7 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KeysWithLimit

func KeysWithLimit(client RedisClient, key string, maxScanCount int) (redisKeys []string, err error)

func RedisAllKeys

func RedisAllKeys(client RedisClient, cache bool) ([]string, error)

func RedisExecute

func RedisExecute(client RedisClient, command string) (interface{}, error)

func RedisHelpMatch

func RedisHelpMatch(text string, matchedFunc func(help RedisHelp)) bool

func RedisKeys

func RedisKeys(client RedisClient, pattern string) ([]string, error)

func RedisServerInfo

func RedisServerInfo(conf config.Config, client RedisClient) (string, error)

Types

type RedisClient

type RedisClient interface {
	Keys(pattern string) *goRedis.StringSliceCmd
	Scan(cursor uint64, match string, count int64) *goRedis.ScanCmd
	Type(key string) *goRedis.StatusCmd
	TTL(key string) *goRedis.DurationCmd
	Get(key string) *goRedis.StringCmd
	LRange(key string, start, stop int64) *goRedis.StringSliceCmd
	SMembers(key string) *goRedis.StringSliceCmd
	ZRangeWithScores(key string, start, stop int64) *goRedis.ZSliceCmd
	HKeys(key string) *goRedis.StringSliceCmd
	HGet(key, field string) *goRedis.StringCmd
	Process(cmd goRedis.Cmder) error
	Do(args ...interface{}) *goRedis.Cmd
	Info(section ...string) *goRedis.StringCmd
}

RedisClient is a redis client which wraps single or cluster client

func NewRedisClient

func NewRedisClient(conf config.Config, outputChan chan core.OutputMessage) RedisClient

type RedisHelp

type RedisHelp struct {
	Command string
	Args    string
	Desc    string
}

func RedisMatchedCommands

func RedisMatchedCommands(text string) []RedisHelp

Jump to

Keyboard shortcuts

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