use of com.pamirs.attach.plugin.es.shadowserver.rest.definition.RestClientDefinition in project LinkAgent by shulieTech.
the class ShadowEsClientHolder method createShadowRestClient.
private static RestClient createShadowRestClient(RestClient target) {
List<String> nodesAddressAsString = getNodesAddressAsString(target);
ShadowEsServerConfig shadowEsServerConfig = findMatchShadowEsServerConfig(nodesAddressAsString);
if (shadowEsServerConfig == null) {
throw new PressureMeasureError(String.format("影子集群未配置,业务节点:%s", StringUtils.join(nodesAddressAsString, ",")));
}
RestClientDefinition restClientDefinition = RestClientDefinitionStrategy.match(target);
return restClientDefinition.solve(target, shadowEsServerConfig);
}
Aggregations