[ server ] [ agent ]- 收集Agent的版本信息
This commit is contained in:
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package io.wdd.common.beans.agent;
|
||||
|
||||
public enum AgentOperationType {
|
||||
|
||||
// 上报版本信息
|
||||
VERSION,
|
||||
|
||||
// 上报核心信息
|
||||
INFO,
|
||||
|
||||
REBOOT,
|
||||
|
||||
UPDATE,
|
||||
|
||||
//关键操作,关闭Agent 只能通过此种方式完成
|
||||
SHUTDOWN
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user