[ server ] [ execution ]- optimize some controller - 1
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
package io.wdd.rpc.controller;
|
||||
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.wdd.common.beans.response.R;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import static io.wdd.rpc.status.MonitorAllAgentStatus.ALL_AGENT_HEALTHY_STATUS_MAP;
|
||||
import static io.wdd.rpc.status.MonitorAllAgentStatus.HEALTHY_STATUS_AGENT_LIST_MAP;
|
||||
|
||||
@RestController
|
||||
@Api("Agent运行状态Controller")
|
||||
@RequestMapping("/octopus/server/status")
|
||||
public class StatusController {
|
||||
|
||||
|
||||
@ApiOperation("获取所有Agent的运行状态")
|
||||
@GetMapping("/agentStatus")
|
||||
public R<Map> GetAllAgentHealthyStatus(){
|
||||
|
||||
return R.ok(ALL_AGENT_HEALTHY_STATUS_MAP);
|
||||
}
|
||||
|
||||
@ApiOperation("获取 状态-Agent Map")
|
||||
@GetMapping("/statusAgent")
|
||||
public R<Map> GetHealthyStatusAgentList(){
|
||||
|
||||
return R.ok(HEALTHY_STATUS_AGENT_LIST_MAP);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user