Documentation
¶
Index ¶
Constants ¶
View Source
const ( INC_HOSTNAME = iota INC_PLATFORM INC_CPU INC_MEM INC_DISK INC_MACADDR )
Variables ¶
This section is empty.
Functions ¶
func ContainsInt ¶
func GetMACAddr ¶
Types ¶
type CPUInfo ¶
type CPUInfo struct {
Threads int32 `json:"threads,omitempty"`
CurrentUsage float64 `json:"currentusage,omitempty"`
Name string `json:"name,omitempty"`
}
CPUInfo saves the CPU information
type DiskInfo ¶
type DiskInfo struct {
SysID string `json:"sysid,omitempty"`
Path string `json:"path,omitempty"`
Total uint64 `json:"total,omitempty"`
Used uint64 `json:"used,omitempty"`
Free uint64 `json:"free,omitempty"`
}
DiskInfo saves the Disk information
type RAMInfo ¶
type RAMInfo struct {
Total uint64 `json:"total,omitempty"`
Used uint64 `json:"used,omitempty"`
Free uint64 `json:"free,omitempty"`
}
RAMInfo saves the RAM information
type SysInfo ¶
type SysInfo struct {
Hostname string `json:"hostname,omitempty"`
Platform string `json:"platform,omitempty"`
CPU CPUInfo `json:"cpu,omitempty"`
RAM RAMInfo `json:"ram,omitempty"`
Disk DiskInfo `json:"disk,omitempty"`
MacAddr string `json:"macaddr,omitempty"`
}
SysInfo saves the basic system information
func GetSysInfo ¶
Click to show internal directories.
Click to hide internal directories.