use of com.alipay.sofa.registry.client.provider.DefaultRegistryClient in project dubbo by apache.
the class SofaRegistry method buildClient.
/**
* Build client registry client.
*
* @param url the url
* @return the registry client
*/
protected RegistryClient buildClient(URL url) {
RegistryClientConfig config = DefaultRegistryClientConfigBuilder.start().setDataCenter(LOCAL_DATA_CENTER).setZone(LOCAL_REGION).setRegistryEndpoint(url.getHost()).setRegistryEndpointPort(url.getPort()).build();
DefaultRegistryClient registryClient = new DefaultRegistryClient(config);
registryClient.init();
return registryClient;
}
Aggregations