org.zodiac.monitor.endpoint.MonitorAgentEndpoint Maven / Gradle / Ivy
package org.zodiac.monitor.endpoint;
import org.zodiac.monitor.data.Agent;
import org.zodiac.monitor.data.Config;
/**
* consul agent api.
*
*/
public class MonitorAgentEndpoint {
private String group;
private final Agent agent;
public MonitorAgentEndpoint(String group) {
this.group = group;
this.agent = new Agent().setConfig(new Config().setDataCenter(this.group));
}
// @ResponseBody
// @GetMapping(value = "/v1/agent/self", produces = HttpMediaType.APPLICATION_JSON_VALUE)
public Agent getNodes() {
return agent;
}
}