Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support nacos registry #10

Merged
merged 1 commit into from
Nov 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ private boolean matchType(String type, String name, String registryId) {
if (type.equalsIgnoreCase(Const.SERVICE_TYPE_K8S) && name.endsWith(".svc.cluster.local")) return true;
if (type.equalsIgnoreCase(Const.SERVICE_TYPE_DUBBO) && name.endsWith(".dubbo")) return true;
if (type.equalsIgnoreCase(Const.SERVICE_TYPE_EUREKA) && name.endsWith(".eureka")) return true;
if (type.equalsIgnoreCase(Const.SERVICE_TYPE_NACOS) && name.endsWith(".nacos")) return true;
return false;
}

Expand All @@ -307,6 +308,7 @@ public void updateIstioGateway(PortalIstioGatewayDTO portalGateway) {
configManager.updateConfig(Trans.portalGW2GW(portalGateway));
}


@Override
public PortalIstioGatewayDTO getIstioGateway(String clusterName) {
IstioGateway istioGateway = new IstioGateway();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ public interface Const {
String SERVICE_TYPE_K8S = "Kubernetes";
String SERVICE_TYPE_DUBBO = "Zookeeper";
String SERVICE_TYPE_EUREKA = "Eureka";
List<String> VAILD_REGISTRY = Arrays.asList(SERVICE_TYPE_CONSUL, SERVICE_TYPE_K8S, SERVICE_TYPE_DUBBO, SERVICE_TYPE_EUREKA);

String SERVICE_TYPE_NACOS = "Nacos";
List<String> VAILD_REGISTRY = Arrays.asList(SERVICE_TYPE_CONSUL, SERVICE_TYPE_K8S, SERVICE_TYPE_DUBBO, SERVICE_TYPE_EUREKA,SERVICE_TYPE_NACOS);

String PROTOCOL_DUBBO = "dubbo";
String DUBBO_APPLICATION = "application";
Expand Down