
com.nepxion.discovery.plugin.framework.adapter.NacosAdapter Maven / Gradle / Ivy
package com.nepxion.discovery.plugin.framework.adapter;
/**
* Title: Nepxion Discovery
* Description: Nepxion Discovery
* Copyright: Copyright (c) 2017-2050
* Company: Nepxion
* @author Haojun Ren
* @version 1.0
*/
import java.util.Map;
import com.alibaba.cloud.nacos.ribbon.NacosServer;
import com.netflix.loadbalancer.Server;
public class NacosAdapter extends AbstractPluginAdapter {
@Override
public Map getServerMetadata(Server server) {
if (server instanceof NacosServer) {
NacosServer nacosServer = (NacosServer) server;
return nacosServer.getMetadata();
}
return emptyMetadata;
// throw new DiscoveryException("Server instance isn't the type of NacosServer");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy