实现基本的区域监控终端管理功能

This commit is contained in:
GoEdgeLab
2021-09-05 11:11:04 +08:00
parent 72b967bf21
commit 921493f49b
11 changed files with 1989 additions and 3 deletions

View File

@@ -0,0 +1,23 @@
package reporterconfigs
type MessageCode = string
// 节点相关消息
const (
MessageCodeConnectedAPINode MessageCode = "connectedAPINode" // 节点连接API节点成功
MessageCodeCheckSystemdService MessageCode = "checkSystemdService" // 检查Systemd服务
MessageCodeNewNodeTask MessageCode = "newNodeTask" // 有新的节点任务产生
)
// ConnectedAPINodeMessage 连接API节点成功
type ConnectedAPINodeMessage struct {
APINodeId int64 `json:"apiNodeId"`
}
// CheckSystemdServiceMessage Systemd服务
type CheckSystemdServiceMessage struct {
}
// NewNodeTaskMessage 有新的节点任务
type NewNodeTaskMessage struct {
}

View File

@@ -0,0 +1,11 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
package reporterconfigs
type NodeConfig struct {
Id int64 `json:"id"`
}
func (this *NodeConfig) Init() error {
return nil
}

View File

@@ -0,0 +1,16 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
package reporterconfigs
type Status struct {
IP string `json:"ip"`
OS string `json:"os"`
OSName string `json:"osName"`
Username string `json:"username"`
BuildVersion string `json:"buildVersion"` // 编译版本
BuildVersionCode uint32 `json:"buildVersionCode"` // 版本数字
UpdatedAt int64 `json:"updatedAt"` // 更新时间
Location string `json:"location"` // 从IP查询到的Location
ISP string `json:"isp"` // 从IP查询到的ISP
}