Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConfigChangeExecuter ¶
type Etcd ¶
type Etcd struct { ConfigServer string `json:"config_server"` AgentGroup string `json:"agent_group"` AgentName string `json:"agent_name"` Apply bool `json:"apply"` EndPoints []string `json:"end_points"` DialTimeout int `json:"dial_timeout"` }
func (*Etcd) WatchConfig ¶
func (e *Etcd) WatchConfig(configName string, configs interface{}, obj ConfigChangeExecuter, wg *sync.WaitGroup)
WatchConfig 参数 ConfigChangeExecuter表示该配置更新是否要执行事件,nil表示不用
type ReportServer ¶
type ReportServer struct { CheckAlive int `json:"check_alive"` //给ReportServer的检查本agent存活的时间阈值 Ip string `json:"ip"` Port string `json:"port"` }
func (*ReportServer) CloseConn ¶
func (r *ReportServer) CloseConn()
func (*ReportServer) ConnectGRPC ¶
func (r *ReportServer) ConnectGRPC() error
func (*ReportServer) Execute ¶
func (r *ReportServer) Execute(wg *sync.WaitGroup) error
Execute 更新配置后执行:重新连接ReportServer并注册
func (*ReportServer) GetAddr ¶
func (r *ReportServer) GetAddr() string
Click to show internal directories.
Click to hide internal directories.