Documentation
¶
Index ¶
- func ComposeRedisAddress(ip string, port string) (address string)
- func Debug(value ...interface{})
- func Fatal(value ...interface{})
- func GetSentinel() (sentinel string)
- func LoadTwemproxyConfig()
- func Log(value ...interface{})
- func ReadYaml(path string, obj interface{}) error
- func RestartTwemproxy() error
- func Run()
- func SaveTwemproxyConfig()
- func SetFileLogger()
- func SubscribeToSentinel()
- func SwitchMaster(master_name string, ip string, port string) error
- func UpdateMaster(master_name string, ip string, port string) bool
- func ValidateCurrentMaster() error
- func ValidateSettings()
- func WriteYaml(path string, obj interface{}) error
- type AgentSettings
- type TwemproxyConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComposeRedisAddress ¶
func GetSentinel ¶
func GetSentinel() (sentinel string)
func LoadTwemproxyConfig ¶
func LoadTwemproxyConfig()
func RestartTwemproxy ¶
func RestartTwemproxy() error
func SaveTwemproxyConfig ¶
func SaveTwemproxyConfig()
func SetFileLogger ¶
func SetFileLogger()
func SubscribeToSentinel ¶
func SubscribeToSentinel()
func ValidateCurrentMaster ¶
func ValidateCurrentMaster() error
func ValidateSettings ¶
func ValidateSettings()
Types ¶
type AgentSettings ¶
type AgentSettings struct { AgentConfigFile string Verbose bool TwemproxyPoolName string `yaml:"twemproxy_pool_name"` TwemproxyConfigFile string `yaml:"twemproxy_config_file"` SentinelIp string `yaml:"sentinel_ip"` SentinelPort string `yaml:"sentinel_port"` RestartCommand string `yaml:"restart_command"` LogFile string `yaml:"log_file"` }
var Settings AgentSettings = AgentSettings{}
type TwemproxyConfig ¶
type TwemproxyConfig struct { Listen string `yaml:"listen,omitempty"` Hash string `yaml:"hash,omitempty"` Distribution string `yaml:"distribution,omitempty"` Redis bool `yaml:"redis,omitempty"` RetryTimeout int `yaml:"server_retry_timeout,omitempty"` FailureLimit int `yaml:"server_failure_limit,omitempty"` Servers []string `yaml:"servers,omitempty"` }
Click to show internal directories.
Click to hide internal directories.