public class NacosGatewayDiscovery extends Object implements GatewayDiscovery
| 限定符和类型 | 字段和说明 |
|---|---|
private GatewayDiscoveryConfig |
discoveryConfig |
private NacosServerConfig |
nacosServerConfig |
private com.alibaba.nacos.api.naming.NamingService |
namingService |
| 构造器和说明 |
|---|
NacosGatewayDiscovery() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
deregisterInstance(GatewayInstance instance) |
private com.alibaba.nacos.api.naming.pojo.Instance |
gatewayInstance2NacosInstance(GatewayInstance gatewayInstance) |
List<GatewayInstance> |
getAllInstances(String serviceName) |
private GatewayInstance |
nacosInstance2GatewayInstance(com.alibaba.nacos.api.naming.pojo.Instance nacosInstance) |
void |
registerInstance(GatewayInstance instance) |
List<GatewayInstance> |
selectInstances(String serviceName,
boolean healthy) |
void |
subscribe(String serviceName,
GatewayDiscoveryListener listener) |
private GatewayDiscoveryConfig discoveryConfig
private NacosServerConfig nacosServerConfig
private com.alibaba.nacos.api.naming.NamingService namingService
public NacosGatewayDiscovery()
public void registerInstance(GatewayInstance instance)
registerInstance 在接口中 GatewayDiscoverypublic void deregisterInstance(GatewayInstance instance)
deregisterInstance 在接口中 GatewayDiscoverypublic List<GatewayInstance> getAllInstances(String serviceName)
getAllInstances 在接口中 GatewayDiscoverypublic List<GatewayInstance> selectInstances(String serviceName, boolean healthy)
selectInstances 在接口中 GatewayDiscoverypublic void subscribe(String serviceName, GatewayDiscoveryListener listener)
subscribe 在接口中 GatewayDiscoveryprivate GatewayInstance nacosInstance2GatewayInstance(com.alibaba.nacos.api.naming.pojo.Instance nacosInstance)
private com.alibaba.nacos.api.naming.pojo.Instance gatewayInstance2NacosInstance(GatewayInstance gatewayInstance)
Copyright © 2024. All rights reserved.