Documentation
¶
Index ¶
- Variables
- func AutoDiscoveryHostAgent(consulEndpoint string, pipe chan<- AgentInfos) error
- func Backmap(fline string) map[string]string
- func CheckIsIn(slicename []string, linename string) bool
- func DefaultHandler(datas AgentInfos)
- func GenerateHostAgentConfig(pipe <-chan AgentInfos, handler Handler)
- func GetRoot() string
- func IsExist(fp string) bool
- func ParseConfig(ver string)
- func Parseurl() []string
- func ReadAdsConfig()
- func SaveConfig() error
- func StartAutoDiscoveryConfig4LocalMode(consulEndpoint string, ver string)
- func UpdateAgentConfig(datas AgentInfos)
- func ValidDomain(domainName string) bool
- func ValidDomaina(domainName string) bool
- type AgentInfos
- type AlertLog
- type AllDomainstruct
- type ChinaMp
- type Config
- type DomainInfostruct
- type Domainstruct
- type Handler
- type HostAgentInfo
- type HostAgentInfos
- type HostNoAgentInfos
- type MapVal
- type NetworkMember
- type PingLog
- type PingSt
- type PingStMini
- type ToolsRes
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Root string Cfg Config //CLock sync.Mutex SelfCfg NetworkMember AlertStatus map[string]bool AuthUserIpMap map[string]bool AuthAgentIpMap map[string]bool ToolLimit map[string]int Db *sql.DB DLock sync.Mutex Ads AllDomainstruct Url = "http://searchdns.search.weibo.com/domain/fourteenth_showalldomain" )
Functions ¶
func AutoDiscoveryHostAgent ¶
func AutoDiscoveryHostAgent(consulEndpoint string, pipe chan<- AgentInfos) error
AutoDiscoveryHostAgent consul中自动获取agent相关信息
func GenerateHostAgentConfig ¶
func GenerateHostAgentConfig(pipe <-chan AgentInfos, handler Handler)
GenerateHostAgentConfig 生成agent配置
func ParseConfig ¶
func ParseConfig(ver string)
func ReadAdsConfig ¶
func ReadAdsConfig()
func SaveConfig ¶
func SaveConfig() error
func StartAutoDiscoveryConfig4LocalMode ¶
StartAutoDiscoveryConfig4LocalMode 开启local模式配置自动更新
func ValidDomain ¶
func ValidDomaina ¶
Types ¶
type AgentInfos ¶
type AgentInfos struct {
Agents HostAgentInfos
NoAgents HostNoAgentInfos
}
AgentInfos agent信息
type AllDomainstruct ¶
type Config ¶
type Config struct {
Ver string
Port int
Name string
Addr string
Mode map[string]string
Base map[string]int
Topology map[string]string
Alert map[string]string
Network map[string]NetworkMember
Chinamap map[string]map[string][]string
Toollimit int
Authiplist string
Password string
}
func ReadConfig ¶
func SaveCloudConfig ¶
type DomainInfostruct ¶
type Domainstruct ¶
type Domainstruct struct {
Result []DomainInfostruct
}
type HostAgentInfo ¶
HostAgentInfo the info of agent registried
type NetworkMember ¶
type PingSt ¶
type PingSt struct {
SendPk int
RevcPk int
LossPk int
MinDelay float64
AvgDelay float64
MaxDelay float64
}
Ping Struct
type PingStMini ¶
type PingStMini struct {
Lastcheck []string `json:"lastcheck"`
LossPk []string `json:"losspk"`
AvgDelay []string `json:"avgdelay"`
}
Ping mini graph Struct
Click to show internal directories.
Click to hide internal directories.