Documentation ¶
Index ¶
Constants ¶
View Source
const ( DEFAULT_CONFIG_FILE = "goworld.ini" DEFAULT_LOCALHOST_IP = "127.0.0.1" DEFAULT_SAVE_ITNERVAL = time.Minute * 5 DEFAULT_PPROF_IP = "127.0.0.1" DEFAULT_LOG_LEVEL = "debug" DEFAULT_STORAGE_DB = "goworld" )
Variables ¶
This section is empty.
Functions ¶
func DumpPretty ¶
func DumpPretty(cfg interface{}) string
func GetGameIDs ¶
func GetGameIDs() []uint16
func GetGateIDs ¶
func GetGateIDs() []uint16
func SetConfigFile ¶
func SetConfigFile(f string)
Types ¶
type DispatcherConfig ¶
type DispatcherConfig struct { Ip string Port int LogFile string LogStderr bool PProfIp string PProfPort int LogLevel string }
func GetDispatcher ¶
func GetDispatcher() *DispatcherConfig
type GameConfig ¶
type GameConfig struct { BootEntity string SaveInterval time.Duration LogFile string LogStderr bool PProfIp string PProfPort int LogLevel string GoMaxProcs int }
func GetGame ¶
func GetGame(serverid uint16) *GameConfig
type GateConfig ¶
type GateConfig struct { Ip string Port int LogFile string LogStderr bool PProfIp string PProfPort int LogLevel string GoMaxProcs int CompressConnection bool }
func GetGate ¶
func GetGate(gateid uint16) *GateConfig
type GoWorldConfig ¶
type GoWorldConfig struct { Dispatcher DispatcherConfig GameCommon GameConfig GateCommon GateConfig Games map[int]*GameConfig Gates map[int]*GateConfig Storage StorageConfig KVDB KVDBConfig }
func Get ¶
func Get() *GoWorldConfig
func Reload ¶
func Reload() *GoWorldConfig
type KVDBConfig ¶
type KVDBConfig struct { Type string Url string // MongoDB DB string // MongoDB Collection string // MongoDB Host string // Redis }
func GetKVDB ¶
func GetKVDB() *KVDBConfig
type StorageConfig ¶
type StorageConfig struct { Type string // Filesystem Storage Configs Directory string // directory for filesystem storage // MongoDB storage configs Url string DB string Host string // Redis host }
func GetStorage ¶
func GetStorage() *StorageConfig
Click to show internal directories.
Click to hide internal directories.