All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.nepxion.discovery.plugin.framework.adapter.NacosAdapter Maven / Gradle / Ivy

There is a newer version: 6.2.0
Show newest version
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 - 2024 Weber Informatics LLC | Privacy Policy