config

package
v0.0.0-...-f651441 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2019 License: MIT Imports: 3 Imported by: 20

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 Cluster

type Cluster struct {
	Namespace   string
	NodeService string
}

Cluster used to store all Redis Cluster configuration information

func (*Cluster) AddFlags

func (c *Cluster) AddFlags(fs *pflag.FlagSet)

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

type Redis

type Redis struct {
	DialTimeout        int
	ClusterNodeTimeout int
	ConfigFileName     string

	HTTPServerAddr  string
	ServerBin       string
	ServerPort      string
	ServerIP        string
	MaxMemory       uint32
	MaxMemoryPolicy string
	ConfigFiles     []string
	// contains filtered or unexported fields
}

Redis used to store all Redis configuration information

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

func (Redis) String

func (r Redis) String() string

String stringer interface

Jump to

Keyboard shortcuts

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