class ConsulNamingService extends  FailbackNamingService implements NamingService {

    @Override
    public List<ServiceInstance> lookup(SubscribeInfo subscribeInfo) {
        try {
            Response<List<HealthService>> consulServices = lookupHealthService(
                    subscribeInfo.getServiceId(), -1);
            List<ServiceInstance> instances = convert(consulServices);
            log.info("lookup {} instances from consul", instances.size());
            return instances;
        } catch (Exception ex) {
            log.warn("lookup endpoint list failed from {}, msg={}",
                    url, ex.getMessage());
            if (!subscribeInfo.isIgnoreFailOfNamingService()) {
                throw new RpcException("lookup endpoint list failed from consul failed", ex);
            } else {
                return new ArrayList<ServiceInstance>();
            }
        }
    }

    public  ConsulNamingService(BrpcURL url);

}