Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
discovery
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
陈文顺
discovery
Commits
24e97e80
Commit
24e97e80
authored
Jul 02, 2018
by
Nepxion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改介绍
parent
9d0feadb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
13 deletions
+48
-13
README.md
+44
-9
discovery-plugin-admin-center/src/main/java/com/nepxion/discovery/plugin/admincenter/endpoint/ConfigEndpoint.java
+1
-1
discovery-plugin-admin-center/src/main/java/com/nepxion/discovery/plugin/admincenter/endpoint/VersionEndpoint.java
+3
-3
No files found.
README.md
View file @
24e97e80
...
...
@@ -252,29 +252,64 @@ public class DiscoveryConfigAdapter extends ConfigAdapter {
```
## 管理中心
### 单独推送规则信息
使用者可以通过Rest方式主动向一个微服务推送规则信息,但该方式只能每次推送到一个微服务上(注意:端口号为management.port的值)
注意:端口号为management.port的值
### 推送规则配置信息
使用者可以通过Rest方式向一个微服务推送规则信息,但该方式只能每次推送到一个微服务上
```
java
Java:
@RequestMapping
(
path
=
"
config
"
,
method
=
RequestMethod
.
POST
)
public
Object
config
(
@RequestBody
String
config
)
@RequestMapping
(
path
=
"
send
"
,
method
=
RequestMethod
.
POST
)
public
ResponseEntity
<?>
send
(
@RequestBody
String
config
)
Url:
http:
//IP:[management.port]/config/send
```
### 查看当前生效的规则信息
使用者可以通过Rest方式
主动请求某个微服务当前生效的规则(注意:端口号为management.port的值)
### 查看当前生效的规则
配置
信息
使用者可以通过Rest方式
查看某个微服务当前生效的规则
```
java
Java:
@RequestMapping
(
path
=
"view"
,
method
=
RequestMethod
.
GET
)
public
String
view
()
public
ResponseEntity
<
String
>
view
()
Url:
http:
//IP:[management.port]/config/view
```
### 设置服务的动态版本
使用者可以通过Rest方式设置某个微服务的动态版本
```
java
Java:
@RequestMapping
(
path
=
"send"
,
method
=
RequestMethod
.
POST
)
public
ResponseEntity
<?>
send
(
@RequestBody
String
version
)
Url:
http:
//IP:[management.port]/version/send
```
### 清除服务的动态版本
使用者可以通过Rest方式清除某个微服务的动态版本
```
java
Java:
@RequestMapping
(
path
=
"clear"
,
method
=
RequestMethod
.
GET
)
public
ResponseEntity
<?>
clear
()
Url:
http:
//IP:[management.port]/version/clear
```
### 查看服务的本地版本和动态版本
使用者可以通过Rest方式查看服务的本地版本和动态版本
```
java
Java:
@RequestMapping
(
path
=
"view"
,
method
=
RequestMethod
.
GET
)
public
ResponseEntity
<
List
<
String
>>
view
()
Url:
http:
//IP:[management.port]/version/view
```
## 路由中心
注意:端口号为server.port的值
### 获取本地节点可访问其他节点(根据服务名)的实例列表
```
java
Java:
...
...
@@ -317,11 +352,11 @@ http://IP:[server.port]/route/{routeServiceId}/{routeHost}/{routePort}
```
### 获取全路径的路由信息
s
erviceIds按调用服务名的前后次序排列,起始节点的服务名不能加上去。如果多个用“;”分隔,不允许出现空格
routeS
erviceIds按调用服务名的前后次序排列,起始节点的服务名不能加上去。如果多个用“;”分隔,不允许出现空格
```
java
Java:
@RequestMapping
(
path
=
"/routeAll"
,
method
=
RequestMethod
.
POST
)
public
RouterEntity
routeAll
(
@RequestBody
String
s
erviceIds
)
public
RouterEntity
routeAll
(
@RequestBody
String
routeS
erviceIds
)
Url:
http:
//IP:[server.port]/routeAll
...
...
discovery-plugin-admin-center/src/main/java/com/nepxion/discovery/plugin/admincenter/endpoint/ConfigEndpoint.java
View file @
24e97e80
...
...
@@ -47,7 +47,7 @@ public class ConfigEndpoint implements MvcEndpoint {
@Autowired
private
RuleEntity
ruleEntity
;
//
发
送规则配置信息
//
推
送规则配置信息
@RequestMapping
(
path
=
"send"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
@ManagedOperation
...
...
discovery-plugin-admin-center/src/main/java/com/nepxion/discovery/plugin/admincenter/endpoint/VersionEndpoint.java
View file @
24e97e80
...
...
@@ -37,7 +37,7 @@ public class VersionEndpoint implements MvcEndpoint {
@Autowired
private
PluginAdapter
pluginAdapter
;
//
发送当前
服务的动态版本
//
设置
服务的动态版本
@RequestMapping
(
path
=
"send"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
@ManagedOperation
...
...
@@ -52,7 +52,7 @@ public class VersionEndpoint implements MvcEndpoint {
return
ResponseEntity
.
ok
().
body
(
"OK"
);
}
// 清除
当前
服务的动态版本
// 清除服务的动态版本
@RequestMapping
(
path
=
"clear"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
@ManagedOperation
...
...
@@ -67,7 +67,7 @@ public class VersionEndpoint implements MvcEndpoint {
return
ResponseEntity
.
ok
().
body
(
"OK"
);
}
// 查看
当前
服务的本地版本和动态版本
// 查看服务的本地版本和动态版本
@RequestMapping
(
path
=
"view"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
@ManagedOperation
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment