use of com.netflix.titus.api.endpoint.v2.rest.representation.LeaderRepresentation in project titus-control-plane by Netflix.
the class LeaderResource method getLeader.
@GET
public LeaderRepresentation getLeader() {
MasterDescription masterDescription = masterMonitor.getLatestLeader();
LeaderRepresentation.Builder builder = LeaderRepresentation.newBuilder().withHostname(masterDescription.getHostname()).withHostIP(masterDescription.getHostIP()).withApiPort(masterDescription.getApiPort()).withApiStatusUri(masterDescription.getApiStatusUri()).withCreateTime(masterDescription.getCreateTime());
return builder.build();
}
Aggregations