use of io.gravitee.rest.api.model.InstanceEntity in project gravitee-management-rest-api by gravitee-io.
the class HealthCheckServiceImpl method getGatewayMetadata.
private Map<String, String> getGatewayMetadata(String gateway) {
Map<String, String> metadata = new HashMap<>();
try {
InstanceEntity instance = instanceService.findById(gateway);
metadata.put("hostname", instance.getHostname());
metadata.put("ip", instance.getIp());
if (instance.getTenant() != null) {
metadata.put("tenant", instance.getTenant());
}
} catch (InstanceNotFoundException infe) {
metadata.put("deleted", "true");
}
return metadata;
}
Aggregations