private void deregisterPolarisService(ProviderConfig config, InstanceRegisterRequest request) {

        InstanceDeregisterRequest instanceDeregisterRequest = new InstanceDeregisterRequest();
        instanceDeregisterRequest.setNamespace(request.getNamespace());
        instanceDeregisterRequest.setService(request.getService());
        instanceDeregisterRequest.setHost(request.getHost());
        instanceDeregisterRequest.setPort(request.getPort());
        providerAPI.deRegister(instanceDeregisterRequest);

        ScheduledFuture future = heartbeatFutures.remove(buildUniqueName(config, request.getProtocol()));
        if (future != null) {
            future.cancel(true);
        }
    }
the main logic of polaris registry, similar to consul

@author <a href=mailto:bner666@gmail.com>ZhangLibin</a>
registry/registry-polaris/src/main/java/com/alipay/sofa/rpc/registry/polaris/PolarisRegistry.java