Version: v0.0.0-...-ca57109 Latest Latest

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

Go to latest
Published: Oct 16, 2020 License: Apache-2.0 Imports: 11 Imported by: 0




This section is empty.


This section is empty.


func ClientPing

func ClientPing() error

ClientPing checks the user-specified `REDISEEN_REDIS_URI` (using default db 0)


type ExtendedClient

type ExtendedClient struct {
	RedisClient *redis.Client

ExtendedClient is a struct type which helps extend Redis Client

func (*ExtendedClient) Init

func (client *ExtendedClient) Init(db int)

Init initiates and prepares a Redis client. Only Redis DB is needed as argument, since all other information will be provided via configuration

func (*ExtendedClient) ListKeys

func (client *ExtendedClient) ListKeys(regexpKeyPatternExposed *regexp.Regexp) []byte

ListKeys lists keys whose names match with REDISEEN_KEY_PATTERN_EXPOSED, together with their types, given a Redis client (in which logical DB is already specified). Only up to 1000 keys will be returned. In the response, we also give `count` and `total`. `count`<=1000, while `total` is the actual total number of keys whose names match with REDISEEN_KEY_PATTERN_EXPOSED

func (*ExtendedClient) RedisInfo

func (client *ExtendedClient) RedisInfo(section string, format string) ([]byte, error)

RedisInfo takes the results of Redis INFO command, then return the result as JSON ([]byte format from json.Marshal)

func (*ExtendedClient) Retrieve

func (client *ExtendedClient) Retrieve(key string, indexOrField string) ([]byte, int)

Retrieve handles requests to different Redis Data Types, and return values correspondingly

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL