config

package
v0.0.0-...-a9bd9a2 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: MIT Imports: 3 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
	// RedisPodMemLimitFilePath default file location for pod memory limit
	RedisPodMemLimitFilePath = "/podinfo/mem_limit"
	// RedisMaxMemoryPolicyDefault default redis max memory eviction 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
	PodMemLimitFilePath string

	HTTPServerAddr  string
	ServerBin       string
	ServerPort      string
	ServerIP        string
	MaxMemory       uint64
	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