[ server ] [ agent ]- 收集Agent的版本信息 初步完成 - 2; 增加OpenFeign; 优化代码
This commit is contained in:
@@ -26,9 +26,16 @@
|
||||
<version>${project.parent.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<!--<dependency>
|
||||
<groupId>de.codecentric</groupId>
|
||||
<artifactId>spring-boot-admin-starter-server</artifactId>
|
||||
</dependency>-->
|
||||
|
||||
<!-- add in 2023-02-08 needed for some operation -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||
<version>2.2.9.RELEASE</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 2023-1-10 introduce the quartz framework -->
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package io.wdd.rpc.agent;
|
||||
|
||||
import io.wdd.server.beans.vo.ServerInfoVO;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface OctopusAgentService {
|
||||
@@ -13,4 +15,18 @@ public interface OctopusAgentService {
|
||||
Map<String, String> getAllAgentVersion();
|
||||
|
||||
|
||||
/**
|
||||
* 获取所有Agent的核心信息,方便更新系统信息
|
||||
*
|
||||
* @return agent-topic-name value -agentServerInfo
|
||||
*/
|
||||
Map<String, ServerInfoVO> getAllAgentCoreInfo();
|
||||
|
||||
|
||||
/**
|
||||
* 执行 Agent 关键操作的接口
|
||||
* 关机
|
||||
* */
|
||||
String shutdownAgentDanger(String agentTopicName);
|
||||
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import io.wdd.common.beans.rabbitmq.OctopusMessage;
|
||||
import io.wdd.common.beans.rabbitmq.OctopusMessageType;
|
||||
import io.wdd.common.utils.TimeUtils;
|
||||
import io.wdd.rpc.message.sender.OMessageToAgentSender;
|
||||
import io.wdd.server.beans.vo.ServerInfoVO;
|
||||
import io.wdd.server.config.ServerCommonPool;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -70,6 +71,17 @@ public class OctopusAgentServiceImpl implements OctopusAgentService {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, ServerInfoVO> getAllAgentCoreInfo() {
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String shutdownAgentDanger(String agentTopicName) {
|
||||
return null;
|
||||
}
|
||||
|
||||
private void waitCollectAllAgentVersionInfo(HashMap<String, String> result, LocalDateTime startTime) {
|
||||
|
||||
CompletableFuture<Void> getAllAgentVersionInfo = new CompletableFuture<>();
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
package io.wdd.rpc.openfeign;
|
||||
|
||||
public class AgentOperationFeign {
|
||||
}
|
||||
Reference in New Issue
Block a user