Documentation
¶
Overview ¶
Package readers provides objects that gathers resource data from a host.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CpuInfo ¶
type CpuInfo struct {
Data map[string][]gopsutil_cpu.CPUInfoStat
}
CpuInfo is a reader that scrapes cpu info data. Data source: https://github.com/shirou/gopsutil/tree/master/cpu
type CpuStat ¶
type CpuStat struct {
Data map[string][]gopsutil_cpu.CPUTimesStat
}
CpuStat is a reader that scrapes cpu stat data. Data source: https://github.com/shirou/gopsutil/tree/master/cpu
type Df ¶
Df is a reader that scrapes disk free data and presents it in the form similar to `df`. Data source: https://github.com/cloudfoundry/gosigar/tree/master
type DiskIO ¶
type DiskIO struct {
Data map[string]gopsutil_disk.DiskIOCountersStat
}
DiskIO is a reader that gathers disk io data. Data source: https://github.com/shirou/gopsutil/tree/master/disk
type DiskPartitions ¶
type DiskPartitions struct {
Data map[string]map[string]gopsutil_disk.DiskPartitionStat
}
DiskPartitions is a reader that gathers partition data. Data source: https://github.com/shirou/gopsutil/tree/master/disk
func NewDiskPartitions ¶
func NewDiskPartitions() *DiskPartitions
NewDiskPartitions is DiskPartitions constructor.
func (*DiskPartitions) Run ¶
func (d *DiskPartitions) Run() error
Run gathers partition information from gopsutil.
func (*DiskPartitions) ToJson ¶
func (d *DiskPartitions) ToJson() ([]byte, error)
ToJson serialize Data field to JSON.
type DockerContainersCpu ¶
type DockerContainersCpu struct {
Data map[string]*gopsutil_cpu.CPUTimesStat
CgroupBasePath string
}
DockerContainersCpu gathers docker containers CPU data. Data sources: * https://github.com/shirou/gopsutil/tree/master/cpu * https://github.com/shirou/gopsutil/blob/master/docker/docker_linux.go
func NewDockerContainersCpu ¶
func NewDockerContainersCpu() *DockerContainersCpu
func (*DockerContainersCpu) Run ¶
func (m *DockerContainersCpu) Run() error
Run gathers cgroup CPU information from cgroup itself. TODO(didip): In newer version of docker we can get this information from docker itself.
func (*DockerContainersCpu) ToJson ¶
func (m *DockerContainersCpu) ToJson() ([]byte, error)
ToJson serialize Data field to JSON.
type DockerContainersMemory ¶
type DockerContainersMemory struct {
Data map[string]*gopsutil_docker.CgroupMemStat
CgroupBasePath string
}
DockerContainersMemory gathers Docker memory data. Data source: https://github.com/shirou/gopsutil/blob/master/docker/docker_linux.go
func NewDockerContainersMemory ¶
func NewDockerContainersMemory() *DockerContainersMemory
func (*DockerContainersMemory) Run ¶
func (m *DockerContainersMemory) Run() error
Run gathers cgroup memory information from cgroup itself. TODO(didip): In newer version of docker we can get this information from docker itself.
func (*DockerContainersMemory) ToJson ¶
func (m *DockerContainersMemory) ToJson() ([]byte, error)
ToJson serialize Data field to JSON.
type Du ¶
Df is a reader that scrapes disk usage data and presents it in the form similar to `du`. Data sources: * https://github.com/cloudfoundry/gosigar/tree/master * https://github.com/shirou/gopsutil/tree/master/disk
type Free ¶
Free is a reader that scrapes memory data and presents it in the form similar to `free`. Data source: https://github.com/cloudfoundry/gosigar/tree/master
type HostInfo ¶
type HostInfo struct {
Data map[string]interface{}
}
func NewHostInfo ¶
func NewHostInfo() *HostInfo
type HostUsers ¶
type HostUsers struct {
Data map[string]gopsutil_host.UserStat
}
func NewHostUsers ¶
func NewHostUsers() *HostUsers
type IReader ¶
IReader is generic interface for all readers.
func NewGoStructByConfig ¶
func NewGoStructByConfig(config resourced_config.Config) (IReader, error)
NewGoStructByConfig instantiates IReader given Config struct
type LoadAvg ¶
type LoadAvg struct {
Data map[string]interface{}
}
func NewLoadAvg ¶
func NewLoadAvg() *LoadAvg
type NetIO ¶
type NetIO struct {
Data map[string]gopsutil_net.NetIOCountersStat
}
type NetInterfaces ¶
type NetInterfaces struct {
Data map[string]gopsutil_net.NetInterfaceStat
}
func NewNetInterfaces ¶
func NewNetInterfaces() *NetInterfaces
func (*NetInterfaces) Run ¶
func (n *NetInterfaces) Run() error
Run gathers network interfaces data from gopsutil.
func (*NetInterfaces) ToJson ¶
func (n *NetInterfaces) ToJson() ([]byte, error)
ToJson serialize Data field to JSON.
type Uptime ¶
type Uptime struct {
Data map[string]interface{}
}
Uptime is a reader that presents its data in the form similar to `uptime`. Data source: https://github.com/cloudfoundry/gosigar/tree/master