use of com.alipay.sofa.rpc.registry.mesh.model.UnSubscribeServiceRequest in project sofa-rpc by sofastack.
the class MeshRegistry method unSubscribe.
@Override
public void unSubscribe(ConsumerConfig config) {
UnSubscribeServiceRequest unsubscribeRequest = buildUnSubscribeServiceRequest(config);
client.unSubscribeService(unsubscribeRequest);
}
use of com.alipay.sofa.rpc.registry.mesh.model.UnSubscribeServiceRequest in project sofa-rpc by sofastack.
the class MeshRegistry method buildUnSubscribeServiceRequest.
protected UnSubscribeServiceRequest buildUnSubscribeServiceRequest(ConsumerConfig config) {
UnSubscribeServiceRequest unsubscribeRequest = new UnSubscribeServiceRequest();
String key = MeshRegistryHelper.buildMeshKey(config, config.getProtocol());
unsubscribeRequest.setServiceName(key);
return unsubscribeRequest;
}
use of com.alipay.sofa.rpc.registry.mesh.model.UnSubscribeServiceRequest in project sofa-rpc by sofastack.
the class MeshApiClientTest method testUnSubscribe.
@Test
public void testUnSubscribe() {
UnSubscribeServiceRequest request = new UnSubscribeServiceRequest();
request.setServiceName("com.alipay.rpc.common.service.facade.pb.SampleServicePb:1.0@DEFAULT");
boolean result = meshApiClient.unSubscribeService(request);
Assert.assertTrue(result);
}
Aggregations