api

package
v0.1.4-0...-f4e6577 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2019 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) *redis.StringSliceCmd
	Scan(cursor uint64, match string, count int64) *redis.ScanCmd
	Type(key string) *redis.StatusCmd
	TTL(key string) *redis.DurationCmd
	Get(key string) *redis.StringCmd
	LRange(key string, start, stop int64) *redis.StringSliceCmd
	SMembers(key string) *redis.StringSliceCmd
	ZRangeWithScores(key string, start, stop int64) *redis.ZSliceCmd
	HKeys(key string) *redis.StringSliceCmd
	HGet(key, field string) *redis.StringCmd
	Process(cmd redis.Cmder) error
	Do(args ...interface{}) *redis.Cmd
	Info(section ...string) *redis.StringCmd
}

func NewRedisClient

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

NewRedisClient create a new redis client which wraps single or cluster client

type RedisHelp

type RedisHelp struct {
	Command string
	Args    string
	Version 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