Documentation ¶
Index ¶
- func ClientPing() error
- type ExtendedClient
- func (client *ExtendedClient) Init(db int)
- func (client *ExtendedClient) ListKeys(regexpKeyPatternExposed *regexp.Regexp) []byte
- func (client *ExtendedClient) RedisInfo(section string, format string) ([]byte, error)
- func (client *ExtendedClient) Retrieve(key string, indexOrField string) ([]byte, int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientPing ¶
func ClientPing() error
ClientPing checks the user-specified `REDISEEN_REDIS_URI` (using default db 0)
Types ¶
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