mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2026-05-03 13:35:17 +08:00
实现基本的区域监控终端管理功能
This commit is contained in:
23
pkg/reporterconfigs/messages.go
Normal file
23
pkg/reporterconfigs/messages.go
Normal 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 {
|
||||
}
|
||||
11
pkg/reporterconfigs/node_config.go
Normal file
11
pkg/reporterconfigs/node_config.go
Normal 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
|
||||
}
|
||||
16
pkg/reporterconfigs/status.go
Normal file
16
pkg/reporterconfigs/status.go
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user