Skip to content

Commit

Permalink
add comments on HostInfo fields
Browse files Browse the repository at this point in the history
  • Loading branch information
calvn committed Sep 18, 2019
1 parent ad5dd01 commit ad7788b
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions helper/hostutil/hostinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,19 @@ import (
// information, refer to: https://github.com/shirou/gopsutil#current-status
type HostInfo struct {
// Timestamp returns the timestamp in UTC on the collection time.
Timestamp time.Time `json:"timestamp"`
CPU []cpu.InfoStat `json:"cpu"`
CPUTimes []cpu.TimesStat `json:"cpu_times"`
Disk []*disk.UsageStat `json:"disk"`
Host *host.InfoStat `json:"host"`
Memory *mem.VirtualMemoryStat `json:"memory"`
Timestamp time.Time `json:"timestamp"`
// CPU returns information about the CPU such as family, model, cores, etc.
CPU []cpu.InfoStat `json:"cpu"`
// CPUTimes returns statistics on CPU usage represented in Jiffies.
CPUTimes []cpu.TimesStat `json:"cpu_times"`
// Disk returns statitics on disk usage for all accessible partitions.
Disk []*disk.UsageStat `json:"disk"`
// Host returns general host information such as hostname, platform, uptime,
// kernel version, etc.
Host *host.InfoStat `json:"host"`
// Memory contains statistics about the memory such as total, available, and
// used memory in number of bytes.
Memory *mem.VirtualMemoryStat `json:"memory"`
}

// HostInfoError is a typed error for more convenient error checking.
Expand Down

0 comments on commit ad7788b

Please sign in to comment.