Documentation ¶
Overview ¶
Package redis contains shared Redis functionality for the metric sets
Index ¶
- func CreatePool(host, password, network string, maxConn int, ...) *rd.Pool
- func FetchRedisInfo(stat string, c rd.Conn) (map[string]string, error)
- func GetRedisEnvHost() string
- func GetRedisEnvPort() string
- func ParseRedisInfo(info string) map[string]string
- func ParseRedisLine(s string, delimeter string) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreatePool ¶
func CreatePool( host, password, network string, maxConn int, idleTimeout, connTimeout time.Duration, ) *rd.Pool
CreatePool creates a redis connection pool
func FetchRedisInfo ¶
FetchRedisInfo returns a map of requested stats.
func GetRedisEnvHost ¶
func GetRedisEnvHost() string
GetRedisEnvHost returns the hostname of the Redis server to use for testing. It reads the value from the REDIS_HOST environment variable and returns 127.0.0.1 if it is not set.
func GetRedisEnvPort ¶
func GetRedisEnvPort() string
GetRedisEnvPort returns the port of the Redis server to use for testing. It reads the value from the REDIS_PORT environment variable and returns 6379 if it is not set.
func ParseRedisInfo ¶
ParseRedisInfo parses the string returned by the INFO command Every line is split up into key and value
func ParseRedisLine ¶
ParseRedisLine parses a single line returned by INFO
Types ¶
This section is empty.