Commit 43474c40 by Nepxion

修改介绍

parent 64a01a4e
...@@ -278,127 +278,9 @@ public class DiscoveryConfigAdapter extends ConfigAdapter { ...@@ -278,127 +278,9 @@ public class DiscoveryConfigAdapter extends ConfigAdapter {
## 管理中心 ## 管理中心
> PORT端口号为server.port或者management.port都可以 > PORT端口号为server.port或者management.port都可以
### 配置接口 ### 配置接口
#### 推送更新规则配置信息
使用者可以通过Rest方式向一个微服务推送更新规则信息,但该方式只能每次推送到一个微服务上,分成异步发送和同步发送两种方式
- 异步发送,无法捕获解析XML异常
- 同步发送,可以捕获解析XML异常
```java
Java:
@RequestMapping(path = "/config/update-async", method = RequestMethod.POST)
public ResponseEntity<?> updateAsync(@RequestBody String config)
Url:
http://IP:PORT/config/update-async
```
```java
Java:
@RequestMapping(path = "/config/update-sync", method = RequestMethod.POST)
public ResponseEntity<?> updateSync(@RequestBody String config)
Url:
http://IP:PORT/config/updateSync
```
#### 查看当前生效的规则配置信息
使用者可以通过Rest方式查看某个微服务当前生效的规则
```java
Java:
@RequestMapping(path = "/config/view", method = RequestMethod.GET)
public ResponseEntity<?> view()
Url:
http://IP:PORT/config/view
```
### 版本接口 ### 版本接口
#### 设置服务的动态版本
使用者可以通过Rest方式设置某个微服务的动态版本
```java
Java:
@RequestMapping(path = "/version/update", method = RequestMethod.POST)
public ResponseEntity<?> update(@RequestBody String version)
Url:
http://IP:PORT/version/update
```
#### 清除服务的动态版本
使用者可以通过Rest方式清除某个微服务的动态版本
```java
Java:
@RequestMapping(path = "/version/clear", method = RequestMethod.GET)
public ResponseEntity<?> clear()
Url:
http://IP:PORT/version/clear
```
#### 查看服务的本地版本和动态版本
使用者可以通过Rest方式查看服务的本地版本和动态版本
```java
Java:
@RequestMapping(path = "/version/view", method = RequestMethod.GET)
public ResponseEntity<List<String>> view()
Url:
http://IP:PORT/version/view
```
### 路由接口 ### 路由接口
#### 获取本地节点可访问其他节点(根据服务名)的实例列表 参考Swagger界面,如下图
```java
Java:
@RequestMapping(path = "/router/instances/{serviceId}", method = RequestMethod.GET)
public List<ServiceInstance> instances(@PathVariable(value = "serviceId") String serviceId)
Url:
http://IP:PORT/router/instances/{serviceId}
```
#### 获取本地节点信息
获取当前节点的简单信息
```java
Java:
@RequestMapping(path = "/router/info", method = RequestMethod.GET)
public RouterEntity info()
Url:
http://IP:PORT/router/info
```
#### 获取本地节点可访问其他节点(根据服务名)的路由信息列表
```java
Java:
@RequestMapping(path = "/router/route/{routeServiceId}", method = RequestMethod.GET)
public List<RouterEntity> route(@PathVariable(value = "routeServiceId") String routeServiceId)
Url:
http://IP:PORT/router/route/{routeServiceId}
```
#### 获取指定节点(根据IP和端口)可访问其他节点(根据服务名)的路由信息列表
```java
Java:
@RequestMapping(path = "/router/route/{routeServiceId}/{routeHost}/{routePort}", method = RequestMethod.GET)
public List<RouterEntity> route(@PathVariable(value = "routeServiceId") String routeServiceId, @PathVariable(value = "routeHost") String routeHost, @PathVariable(value = "routePort") int routePort)
Url:
http://IP:PORT/router/route/{routeServiceId}/{routeHost}/{routePort}
```
#### 获取全路径的路由信息树
routeServiceIds按调用服务名的前后次序排列,起始节点的服务名不能加上去。如果多个用“;”分隔,不允许出现空格
```java
Java:
@RequestMapping(path = "/router/routes", method = RequestMethod.POST)
public RouterEntity routes(@RequestBody String routeServiceIds)
Url:
http://IP:PORT/router/routes
```
上述操作,也可以通过集成的Swagger服务来执行,如下图
![Alt text](https://github.com/Nepxion/Docs/blob/master/discovery-plugin-doc/Swagger-1.jpg) ![Alt text](https://github.com/Nepxion/Docs/blob/master/discovery-plugin-doc/Swagger-1.jpg)
...@@ -409,68 +291,7 @@ http://IP:PORT/router/routes ...@@ -409,68 +291,7 @@ http://IP:PORT/router/routes
> PORT端口号为server.port或者management.port都可以 > PORT端口号为server.port或者management.port都可以
### 控制台接口 ### 控制台接口
#### 获取服务注册中心的服务列表 参考Swagger界面,如下图
```java
Java:
@RequestMapping(path = "/console/services", method = RequestMethod.GET)
public List<String> services()
Url:
http://IP:PORT/console/services
```
#### 获取服务注册中心服务的实例列表
```java
Java:
@RequestMapping(path = "/console/instances/{serviceId}", method = RequestMethod.GET)
public List<ServiceInstance> instances(String serviceId)
Url:
http://IP:PORT/console/instances/{serviceId}
```
#### 获取服务注册中心服务的实例列表(精简数据)
```java
Java:
@RequestMapping(path = "/console/instance-list/{serviceId}", method = RequestMethod.GET)
public List<InstanceEntity> instanceList(String serviceId)
Url:
http://IP:PORT/console/instance-list/{serviceId}
```
#### 获取服务注册中心的服务和实例的Map(精简数据)
```java
Java:
@RequestMapping(path = "/console/instance-map", method = RequestMethod.GET)
public Map<String, List<InstanceEntity>> instanceMap()
Url:
http://IP:PORT/console/instance-map/{serviceId}
```
#### 批量推送更新规则配置信息
分成异步发送和同步发送两种方式
- 异步发送,无法捕获解析XML异常
- 同步发送,可以捕获解析XML异常
```java
Java:
@RequestMapping(path = "/console/config/update-async/{serviceId}", method = RequestMethod.POST)
public ResponseEntity<?> configUpdateAsync(String serviceId, String config)
Url:
http://IP:PORT/console/config/update-async/{serviceId}
```
```java
Java:
@RequestMapping(path = "/console/config/update-sync/{serviceId}", method = RequestMethod.POST)
public ResponseEntity<?> configUpdateSync(String serviceId, String config)
Url:
http://IP:PORT/console/config/update-sync/{serviceId}
```
上述操作,也可以通过集成的Swagger服务来执行,如下图
![Alt text](https://github.com/Nepxion/Docs/blob/master/discovery-plugin-doc/Swagger-2.jpg) ![Alt text](https://github.com/Nepxion/Docs/blob/master/discovery-plugin-doc/Swagger-2.jpg)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment