Parcourir la source

Carry appName in FetchClusterServerInfo command

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
master
Eric Zhao il y a 5 ans
Parent
révision
094ba3bfba
1 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. +4
    -0
      sentinel-cluster/sentinel-cluster-server-default/src/main/java/com/alibaba/csp/sentinel/cluster/server/command/handler/FetchClusterServerInfoCommandHandler.java

+ 4
- 0
sentinel-cluster/sentinel-cluster-server-default/src/main/java/com/alibaba/csp/sentinel/cluster/server/command/handler/FetchClusterServerInfoCommandHandler.java Voir le fichier

@@ -27,6 +27,7 @@ import com.alibaba.csp.sentinel.command.CommandHandler;
import com.alibaba.csp.sentinel.command.CommandRequest;
import com.alibaba.csp.sentinel.command.CommandResponse;
import com.alibaba.csp.sentinel.command.annotation.CommandMapping;
import com.alibaba.csp.sentinel.util.AppNameUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

@@ -69,6 +70,9 @@ public class FetchClusterServerInfoCommandHandler implements CommandHandler<Stri
.fluentPut("namespaceSet", namespaceSet)
.fluentPut("embedded", ClusterServerConfigManager.isEmbedded());

// Since 1.5.0 the appName is carried so that the caller can identify the appName of the token server.
info.put("appName", AppNameUtil.getAppName());

return CommandResponse.ofSuccess(info.toJSONString());
}



Chargement…
Annuler
Enregistrer