Documentation ¶
Index ¶
- Constants
- func AfterReLoadConfig(pconfig *Config, old_config *FileConfig, new_config *FileConfig)
- func CommSet(pconfig *Config) bool
- func LocalSet(pconfig *Config) bool
- func ParseAuth(pconfig *Config) bool
- func ParseClientList(pconfig *Config) bool
- func RegReportCmd(pconfig *Config)
- func ServerExit(pconfig *Config)
- func ServerStart(pconfig *Config)
- type AuthInfo
- type Config
- type FileConfig
- type PanelServ
- type PeerStat
- type ReportRecver
- type WatchClient
Constants ¶
View Source
const ( TIME_FORMAT_SEC = "2006-01-02 15:04:05" INDEX_TMPL = "./html_tmpl/index.html" DETAIL_TMPL = "./html_tmpl/detail.html" LOGIN_TMPL = "./html_tmpl/login.html" COOKIE_NAME = "manage_token" )
View Source
const ( MAX_RECV_PER_TICK = 10 CMD_CHAN_SIZE = 10000 MAX_SND_CMD_TICK = 100 )
Variables ¶
This section is empty.
Functions ¶
func AfterReLoadConfig ¶
func AfterReLoadConfig(pconfig *Config, old_config *FileConfig, new_config *FileConfig)
After ReLoad Config If Need Handle
func ParseClientList ¶
parse FileConfig.ClientList --> Config.WatchMap
func ServerExit ¶
func ServerExit(pconfig *Config)
Types ¶
type Config ¶
type Config struct { NameSpace string ProcId int ProcName string ConfigFile string Daemon bool FileConfig *FileConfig Comm *comm.CommConfig WatchMap map[int]*WatchClient Name2Id map[string]int Recver *ReportRecver Panel *PanelServ AuthMap map[string]*AuthInfo TokenMap map[string]string CmdMap map[string]bool //report_proto.go:Report Cmd // contains filtered or unexported fields }
type FileConfig ¶
type FileConfig struct { ListenAddr string `json:"listen_addr"` //listen report HttpAddr string `json:"http_addr"` //listen http request LogFile string `json:"log_file"` ClientList []interface{} `json:"client_list"` HeartTimeout int `json:"heart_timeout"` ReloadTimeout int `json:"reload_timeout"` Auth []string `json:"auth"` //name:pass etc. AuthExpire int `json:"auth_expire"` //expired seconds after auth }
type PanelServ ¶
type PanelServ struct {
// contains filtered or unexported fields
}
func StartPanel ¶
type ReportRecver ¶
type ReportRecver struct {
// contains filtered or unexported fields
}
func StartRecver ¶
func StartRecver(pconfig *Config) *ReportRecver
func (*ReportRecver) Close ¶
func (precver *ReportRecver) Close()
type WatchClient ¶
Click to show internal directories.
Click to hide internal directories.