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