示例#1
0
文件: join.go 项目: elleFlorio/gru
func initializeAgent(clusterName string) {
	configPath := c_GRU_REMOTE + clusterName + "/" + c_CONFIG_REMOTE
	agentConfig := cfg.Agent{}
	cfg.ReadAgentConfig(configPath, &agentConfig)
	cfg.SetAgent(agentConfig)
	agent.Initialize()
}
示例#2
0
func updateAgent(cluster string) {
	configPath := c_GRU_REMOTE + cluster + "/" + c_CONFIG_REMOTE
	agentConfig := cfg.Agent{}
	cfg.ReadAgentConfig(configPath, &agentConfig)
	cfg.SetAgent(agentConfig)
	agent.UpdateStrategy()
	log.WithField("agent", agentConfig).Debugln("Agent updated from remote")
}