Versions in this module Expand all Collapse all v1 v1.1.0 Jun 27, 2017 Changes in this version + type CPUStats struct + CollectCPUTime bool + PerCPU bool + TotalCPU bool + func NewCPUStats(ps PS) *CPUStats + func (_ *CPUStats) Name() string + func (_ *CPUStats) SampleConfig() string + func (s *CPUStats) Collect() (datas []map[string]interface{}, err error) + type DiskIOStats struct + DeviceTags []string + Devices []string + NameTemplates []string + SkipSerialNumber bool + func (_ *DiskIOStats) Name() string + func (s *DiskIOStats) Collect() (datas []map[string]interface{}, err error) + type DiskStats struct + IgnoreFS []string + MountPoints []string + Mountpoints []string + func (_ *DiskStats) Name() string + func (_ *DiskStats) SampleConfig() string + func (s *DiskStats) Collect() (datas []map[string]interface{}, err error) + type Kernel struct — linux/amd64 + func (k *Kernel) Collect() (datas []map[string]interface{}, err error) + func (k *Kernel) Name() string + type KernelVmstat struct — linux/amd64 + func (k *KernelVmstat) Collect() (datas []map[string]interface{}, err error) + func (k *KernelVmstat) Name() string + type MemStats struct + func (_ *MemStats) Name() string + func (s *MemStats) Collect() (datas []map[string]interface{}, err error) + type MockPS struct + func (m *MockPS) CPUTimes(perCPU, totalCPU bool) ([]cpu.TimesStat, error) + func (m *MockPS) DiskIO(names []string) (map[string]disk.IOCountersStat, error) + func (m *MockPS) DiskUsage(mountPointFilter []string, fstypeExclude []string) ([]*disk.UsageStat, []*disk.PartitionStat, error) + func (m *MockPS) LoadAvg() (*load.AvgStat, error) + func (m *MockPS) NetConnections() ([]net.ConnectionStat, error) + func (m *MockPS) NetIO() ([]net.IOCountersStat, error) + func (m *MockPS) NetProto() ([]net.ProtoCountersStat, error) + func (m *MockPS) SwapStat() (*mem.SwapMemoryStat, error) + func (m *MockPS) VMStat() (*mem.VirtualMemoryStat, error) + type MockPSDisk struct + func (s MockPSDisk) CPUTimes(perCPU, totalCPU bool) ([]cpu.TimesStat, error) + func (s MockPSDisk) DiskIO(names []string) (map[string]disk.IOCountersStat, error) + func (s MockPSDisk) DiskUsage(mountPointFilter []string, fstypeExclude []string) ([]*disk.UsageStat, []*disk.PartitionStat, error) + func (s MockPSDisk) NetConnections() ([]net.ConnectionStat, error) + func (s MockPSDisk) NetIO() ([]net.IOCountersStat, error) + func (s MockPSDisk) NetProto() ([]net.ProtoCountersStat, error) + func (s MockPSDisk) SwapStat() (*mem.SwapMemoryStat, error) + func (s MockPSDisk) VMStat() (*mem.VirtualMemoryStat, error) + type NetIOStats struct + Interfaces []string + func (_ *NetIOStats) Name() string + func (s *NetIOStats) Collect() (datas []map[string]interface{}, err error) + type NetStats struct + func (_ *NetStats) Name() string + func (s *NetStats) Collect() (datas []map[string]interface{}, err error) + type PS interface + CPUTimes func(perCPU, totalCPU bool) ([]cpu.TimesStat, error) + DiskIO func(names []string) (map[string]disk.IOCountersStat, error) + DiskUsage func(mountPointFilter []string, fstypeExclude []string) ([]*disk.UsageStat, []*disk.PartitionStat, error) + NetConnections func() ([]net.ConnectionStat, error) + NetIO func() ([]net.IOCountersStat, error) + NetProto func() ([]net.ProtoCountersStat, error) + SwapStat func() (*mem.SwapMemoryStat, error) + VMStat func() (*mem.VirtualMemoryStat, error) + type PSDiskDeps interface + OSGetenv func(key string) string + OSStat func(name string) (os.FileInfo, error) + PSDiskUsage func(path string) (*disk.UsageStat, error) + Partitions func(all bool) ([]disk.PartitionStat, error) + type Processes struct — darwin/amd64, js/wasm, linux/amd64 + func (p *Processes) Collect() (datas []map[string]interface{}, err error) + func (p *Processes) Name() string + type SwapStats struct + func (_ *SwapStats) Name() string + func (s *SwapStats) Collect() (datas []map[string]interface{}, err error) + type SysctlFS struct + func (_ SysctlFS) Name() string + func (sfs *SysctlFS) Collect() (datas []map[string]interface{}, err error) + type SystemStats struct + func (_ *SystemStats) Collect() (datas []map[string]interface{}, err error) + func (_ *SystemStats) Name() string