[ Cmii ] [ Octopus ] - reformat agent-go - 1
This commit is contained in:
9
agent-go/a_agent/AgentHandler.go
Normal file
9
agent-go/a_agent/AgentHandler.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package a_agent
|
||||
|
||||
import "wdd.io/agent-common/logger"
|
||||
|
||||
var log = logger.Log
|
||||
|
||||
func Activate() {
|
||||
log.Info("Module [ AGENT ] activated !")
|
||||
}
|
||||
37
agent-go/a_agent/AgentServerInfo.go
Normal file
37
agent-go/a_agent/AgentServerInfo.go
Normal file
@@ -0,0 +1,37 @@
|
||||
package a_agent
|
||||
|
||||
import "github.com/spf13/viper"
|
||||
|
||||
var AgentServerInfoCache = &AgentServerInfo{}
|
||||
|
||||
var AgentConfig *viper.Viper
|
||||
|
||||
type AgentServerInfo struct {
|
||||
ServerName string `json:"serverName" yaml:"serverName"`
|
||||
ServerIPPbV4 string `json:"serverIpPbV4" yaml:"serverIpPbV4"`
|
||||
ServerIPInV4 string `json:"serverIpInV4" yaml:"serverIpInV4"`
|
||||
ServerIPPbV6 string `json:"serverIpPbV6" yaml:"serverIpPbV6"`
|
||||
ServerIPInV6 string `json:"serverIpInV6" yaml:"serverIpInV6"`
|
||||
Location string `json:"location" yaml:"location"`
|
||||
Provider string `json:"provider" yaml:"provider"`
|
||||
ManagePort string `json:"managePort" yaml:"managePort"`
|
||||
CPUCore string `json:"cpuCore" yaml:"cpuCore"`
|
||||
CPUBrand string `json:"cpuBrand" yaml:"cpuBrand"`
|
||||
OSInfo string `json:"osInfo" yaml:"osInfo"`
|
||||
OSKernelInfo string `json:"osKernelInfo" yaml:"osKernelInfo"`
|
||||
TCPControl string `json:"tcpControl" yaml:"tcpControl"`
|
||||
Virtualization string `json:"virtualization" yaml:"virtualization"`
|
||||
Platform string `json:"platform"` // ex: ubuntu, linuxmint
|
||||
PlatformFamily string `json:"platformFamily"` // ex: debian, rhel
|
||||
PlatformVersion string `json:"platformVersion"` // version of the complete OS
|
||||
KernelVersion string `json:"kernelVersion"` // version of the OS kernel (if available)
|
||||
KernelArch string `json:"kernelArch"` // native cpu architecture queried at runtime, as returned by `uname -m` or empty string in case of error
|
||||
IoSpeed string `json:"ioSpeed" yaml:"ioSpeed"`
|
||||
MemoryTotal string `json:"memoryTotal" yaml:"memoryTotal"`
|
||||
DiskTotal string `json:"diskTotal" yaml:"diskTotal"`
|
||||
DiskUsage string `json:"diskUsage" yaml:"diskUsage"`
|
||||
Comment string `json:"comment" yaml:"comment"`
|
||||
MachineID string `json:"machineId" yaml:"machineId"`
|
||||
AgentVersion string `json:"agentVersion" yaml:"agentVersion"`
|
||||
TopicName string `json:"topicName" yaml:"topicName"`
|
||||
}
|
||||
Reference in New Issue
Block a user