Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ClusterMode = "cluster" StandaloneMode = "standalone" )
View Source
var ( Properties *ServerProperties EachTimeServerInfo *ServerInfo )
Properties holds global config properties
Functions ¶
func SetupConfig ¶
func SetupConfig(configFilename string)
SetupConfig read config file and store properties into Properties
Types ¶
type ServerInfo ¶
type ServerProperties ¶
type ServerProperties struct { // for Public configuration RunID string `cfg:"runid"` // runID always different at every exec. Bind string `cfg:"bind"` Port int `cfg:"port"` Dir string `cfg:"dir"` AnnounceHost string `cfg:"announce-host"` AppendOnly bool `cfg:"appendonly"` AppendFilename string `cfg:"appendfilename"` AppendFsync string `cfg:"appendfsync"` AofUseRdbPreamble bool `cfg:"aof-use-rdb-preamble"` MaxClients int `cfg:"maxclients"` RequirePass string `cfg:"requirepass"` Databases int `cfg:"databases"` RDBFilename string `cfg:"dbfilename"` MasterAuth string `cfg:"masterauth"` SlaveAnnouncePort int `cfg:"slave-announce-port"` SlaveAnnounceIP string `cfg:"slave-announce-ip"` ReplTimeout int `cfg:"repl-timeout"` ClusterEnable bool `cfg:"cluster-enable"` ClusterAsSeed bool `cfg:"cluster-as-seed"` ClusterSeed string `cfg:"cluster-seed"` ClusterConfigFile string `cfg:"cluster-config-file"` // for cluster mode configuration ClusterEnabled string `cfg:"cluster-enabled"` // Not used at present. Peers []string `cfg:"peers"` Self string `cfg:"self"` // config file path CfPath string `cfg:"cf,omitempty"` }
ServerProperties defines global config properties
func (*ServerProperties) AnnounceAddress ¶
func (p *ServerProperties) AnnounceAddress() string
Click to show internal directories.
Click to hide internal directories.