[ server ] [ agent ]- 收集Agent的版本信息

This commit is contained in:
zeaslity
2023-02-07 16:26:22 +08:00
parent f4e636a368
commit 602e3c3034
20 changed files with 334 additions and 84 deletions

View File

@@ -14,11 +14,22 @@ import java.time.LocalDateTime;
@SuperBuilder(toBuilder = true)
public class AgentOperationMessage {
private String operationName;
/**
* 执行Agent Operation操作的类型
*/
private AgentOperationType opType;
/**
* 需要执行的目标时间,
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Deprecated
private LocalDateTime operationTime;
/**
* 期望升级到的目标版本
*/
private String updateVersion;
}

View File

@@ -0,0 +1,18 @@
package io.wdd.common.beans.agent;
public enum AgentOperationType {
// 上报版本信息
VERSION,
// 上报核心信息
INFO,
REBOOT,
UPDATE,
//关键操作,关闭Agent 只能通过此种方式完成
SHUTDOWN
}

View File

@@ -20,6 +20,9 @@ public class OctopusMessage {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
LocalDateTime init_time;
/**
* 执行操作的类型
*/
OctopusMessageType type;
// server send message content
@@ -28,6 +31,9 @@ public class OctopusMessage {
// agent reply message content
Object result;
/**
* Agent 完成操作的时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
LocalDateTime ac_time;