func initializeAgent(clusterName string) { configPath := c_GRU_REMOTE + clusterName + "/" + c_CONFIG_REMOTE agentConfig := cfg.Agent{} cfg.ReadAgentConfig(configPath, &agentConfig) cfg.SetAgent(agentConfig) agent.Initialize() }
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") }