[ server ] [ agent ]- 收集Agent的版本信息
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
package io.wdd.rpc.controller;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.wdd.common.beans.response.R;
|
||||
import io.wdd.rpc.agent.OctopusAgentService;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/octopus/server/agent")
|
||||
@Api("处理Agent核心内容的Controller")
|
||||
public class AgentController {
|
||||
|
||||
@Resource
|
||||
OctopusAgentService octopusAgentService;
|
||||
|
||||
@GetMapping("/version")
|
||||
@ApiOperation("获取所有OctopusAgent的版本")
|
||||
public R<Map<String, String>> getAllAgentVersion(){
|
||||
|
||||
return R.ok(octopusAgentService.getAllAgentVersion());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user