Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CPUCoreStat ¶
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
func (Collector) Collect ¶
func (c Collector) Collect() (SystemStat, error)
type CollectorOption ¶
type CollectorOption func(*Collector)
func WithRawCollector ¶
func WithRawCollector(c RawCollector) CollectorOption
type HealthStat ¶
type InputFunc ¶
type InputFunc func() (SystemStat, error)
type NetworkStat ¶
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
func NewProcessor ¶
type ProtoCountersStat ¶
type RawCollector ¶
type RawCollector interface { ProtoCountersWithContext(context.Context, []string) ([]net.ProtoCountersStat, error) VirtualMemoryWithContext(context.Context) (*mem.VirtualMemoryStat, error) SwapMemoryWithContext(context.Context) (*mem.SwapMemoryStat, error) AvgWithContext(context.Context) (*load.AvgStat, error) TimesWithContext(context.Context, bool) ([]cpu.TimesStat, error) UsageWithContext(context.Context, string) (*disk.UsageStat, error) NetIOCountersWithContext(context.Context, bool) ([]net.IOCountersStat, error) DiskIOCountersWithContext(context.Context, ...string) (map[string]disk.IOCountersStat, error) PartitionsWithContext(context.Context, bool) ([]disk.PartitionStat, error) InstanceHealth() ([]byte, error) }
type StatsSender ¶
type StatsSender interface {
Send(SystemStat)
}
type SystemStat ¶
type SystemStat struct { CPUStat CPUCoreStats []CPUCoreStat MemKB uint64 MemPercent float64 SwapKB uint64 SwapPercent float64 Load1M float64 Load5M float64 Load15M float64 SystemDisk DiskStat EphemeralDisk DiskStat PersistentDisk DiskStat ProtoCounters ProtoCountersStat Networks []NetworkStat Health HealthStat }
Click to show internal directories.
Click to hide internal directories.