use of org.apache.servicecomb.core.definition.ConsumerMicroserviceVersionsMeta in project java-chassis by ServiceComb.
the class SCBEngine method createMicroserviceReferenceConfig.
/**
* for edge, versionRule maybe controlled by url rule
* @param microserviceName hortName, or appId:shortName when invoke cross app
* @param versionRule if is empty, then use configuration value
* @return
*/
public MicroserviceReferenceConfig createMicroserviceReferenceConfig(String microserviceName, String versionRule) {
ensureStatusUp();
MicroserviceVersions microserviceVersions = DiscoveryManager.INSTANCE.getOrCreateMicroserviceVersions(parseAppId(microserviceName), microserviceName);
ConsumerMicroserviceVersionsMeta microserviceVersionsMeta = CoreMetaUtils.getMicroserviceVersionsMeta(microserviceVersions);
return new MicroserviceReferenceConfig(microserviceVersionsMeta, versionRule);
}
Aggregations