redis

package
v5.6.8+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2018 License: Apache-2.0 Imports: 5 Imported by: 558

Documentation

Overview

Package redis contains shared Redis functionality for the metric sets

Index

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

func FetchRedisInfo(stat string, c rd.Conn) (map[string]string, error)

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

func ParseRedisInfo(info string) map[string]string

ParseRedisInfo parses the string returned by the INFO command Every line is split up into key and value

func ParseRedisLine

func ParseRedisLine(s string, delimeter string) []string

ParseRedisLine parses a single line returned by INFO

Types

This section is empty.

Directories

Path Synopsis
Package info fetches Redis server information and statistics using the Redis INFO command.
Package info fetches Redis server information and statistics using the Redis INFO command.

Jump to

Keyboard shortcuts

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