Help us shape the future of Go! Take the 2026 Go Developer Survey

config

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultRedisTimeout default redis timeout (ms)
	DefaultRedisTimeout = 2000
	//DefaultClusterNodeTimeout default cluster node timeout (ms)
	//The maximum amount of time a Redis Cluster node can be unavailable, without it being considered as failing
	DefaultClusterNodeTimeout = 2000
	// RedisRenameCommandsDefaultPath default path to volume storing rename commands
	RedisRenameCommandsDefaultPath = "/etc/secret-volume"
	// RedisRenameCommandsDefaultFile default file name containing rename commands
	RedisRenameCommandsDefaultFile = ""
	// RedisConfigFileDefault default config file path
	RedisConfigFileDefault = "/redis-conf/redis.conf"
	// RedisServerBinDefault default binary name
	RedisServerBinDefault = "redis-server"
	// RedisServerPortDefault default redis port
	RedisServerPortDefault = "6379"
	// RedisMaxMemoryDefault default redis max memory
	RedisMaxMemoryDefault = 0
	// RedisMaxMemoryPolicyDefault default redis max memory evition policy
	RedisMaxMemoryPolicyDefault = "noeviction"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Redis

type Redis struct {
	DialTimeout        int
	ClusterNodeTimeout int
	ConfigFileName     string
	RenameCommandsPath string
	RenameCommandsFile string
	HTTPServerAddr     string
	ServerBin          string
	ServerPort         string
	ServerIP           string
	MaxMemory          uint32
	MaxMemoryPolicy    string
	ConfigFiles        []string
}

Redis used to store all Redis configuration information

func RedisConf

func RedisConf() *Redis

func (*Redis) AddFlags

func (r *Redis) AddFlags(fs *pflag.FlagSet)

AddFlags use to add the Redis Config flags to the command line

func (*Redis) GetRenameCommandsFile

func (r *Redis) GetRenameCommandsFile() string

GetRenameCommandsFile return the path to the rename command file, or empty string if not define

Jump to

Keyboard shortcuts

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