Documentation ¶
Index ¶
- Constants
- Variables
- func InitRedisCluster(redisSvrAddrs []string) error
- func RegisterToConsul(listenIP string, listenPort int, consulServerIP string, healthCheckPort int) error
- type ConfigMgr
- func (configMgr *ConfigMgr) GetGMKey() string
- func (configMgr *ConfigMgr) GetNavigationConfig() *NavigationConfigS
- func (configMgr *ConfigMgr) GetSysConfPath() string
- func (configMgr *ConfigMgr) GetToken() string
- func (configMgr *ConfigMgr) GetVersionInfo(channelName string) *VersionInfoS
- func (configMgr *ConfigMgr) Init(configFile string) error
- func (configMgr *ConfigMgr) ParseConfig() error
- func (configMgr *ConfigMgr) ReloadConfig() string
- type ConfigS
- type NavigationConfigS
- type NavigationEnvUrlS
- type VersionConfigS
- type VersionInfoS
Constants ¶
View Source
const ( ConsulServName string = "SailCraft-GuideSvr" ConsulHealthCheckUrlFmt string = "http://%s:%d/GuideSvr/healthCheck" )
Variables ¶
View Source
var ( ConsulServInstanceID string ConsulClient *api.Client )
View Source
var (
GRedisCluster *redistool.RedisCluster = nil
)
Functions ¶
func InitRedisCluster ¶
Types ¶
type ConfigMgr ¶
type ConfigMgr struct {
// contains filtered or unexported fields
}
var (
GConfig *ConfigMgr
)
func (*ConfigMgr) GetNavigationConfig ¶
func (configMgr *ConfigMgr) GetNavigationConfig() *NavigationConfigS
func (*ConfigMgr) GetSysConfPath ¶
func (*ConfigMgr) GetVersionInfo ¶
func (configMgr *ConfigMgr) GetVersionInfo(channelName string) *VersionInfoS
func (*ConfigMgr) ParseConfig ¶
func (*ConfigMgr) ReloadConfig ¶
type ConfigS ¶
type ConfigS struct { Token string `json:"Token"` VersionConfig VersionConfigS `json:"VersionConfig"` SysConfPath string `json:"SysConfPath"` GMKey string `json:"GMKey"` }
type NavigationConfigS ¶
type NavigationConfigS struct {}
func (*NavigationConfigS) CheckVersion ¶
func (nc *NavigationConfigS) CheckVersion(clientVersion string) *NavigationEnvUrlS
type NavigationEnvUrlS ¶
type NavigationEnvUrlS struct {}
type VersionConfigS ¶
type VersionConfigS struct {
VersionInfo []VersionInfoS `json:"VersionInfo"`
}
Click to show internal directories.
Click to hide internal directories.