[agent-go] 完成RabbitMQ连接部分的代码
This commit is contained in:
@@ -4,15 +4,12 @@ package io.wdd.agent.executor.web;
|
||||
import io.wdd.agent.executor.CommandExecutor;
|
||||
import io.wdd.agent.executor.FunctionExecutor;
|
||||
import io.wdd.common.beans.executor.ExecutionMessage;
|
||||
import io.wdd.common.beans.rabbitmq.OctopusMessage;
|
||||
import io.wdd.common.beans.response.R;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("testExecutor")
|
||||
@@ -25,15 +22,13 @@ public class TestCommandExecutorController {
|
||||
FunctionExecutor functionExecutor;
|
||||
|
||||
|
||||
/*@PostMapping("comand")
|
||||
@PostMapping("comand")
|
||||
public R<String> testFor(
|
||||
@RequestParam(value = "streamKey") String streamKey,
|
||||
@RequestParam(value = "command") List<String> command
|
||||
){
|
||||
commandExecutor.execute(streamKey, command);
|
||||
@RequestBody OctopusMessage octopusMessage
|
||||
) {
|
||||
|
||||
return R.ok(streamKey);
|
||||
}*/
|
||||
return R.ok("1");
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("linuxFile")
|
||||
|
||||
@@ -6,6 +6,7 @@ import io.wdd.agent.initialization.bootup.CollectSystemInfo;
|
||||
import io.wdd.agent.initialization.bootup.OctopusAgentInitService;
|
||||
import io.wdd.common.beans.response.R;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@@ -23,7 +24,7 @@ public class SendServerInfoController {
|
||||
OctopusAgentInitService octopusAgentInitService;
|
||||
|
||||
@PostMapping("sendAgentInfo")
|
||||
public R<AgentServerInfo> send(){
|
||||
public R<AgentServerInfo> send(@RequestBody AgentServerInfo info) {
|
||||
|
||||
AgentServerInfo agentServerInfo = collectSystemInfo.agentServerInfo;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user