ctop/metrics/main.go

34 lines
512 B
Go
Raw Normal View History

2017-02-23 02:03:55 +00:00
package metrics
type Metrics struct {
2017-03-12 01:35:40 +00:00
CPUUtil int
NetTx int64
NetRx int64
MemLimit int64
MemPercent int
MemUsage int64
IOBytesRead int64
IOBytesWrite int64
Pids int
}
func NewMetrics() Metrics {
return Metrics{
2017-06-10 13:00:54 +00:00
CPUUtil: -1,
NetTx: -1,
NetRx: -1,
MemUsage: -1,
MemPercent: -1,
IOBytesRead: -1,
IOBytesWrite: -1,
Pids: -1,
}
}
type Collector interface {
Stream() chan Metrics
Running() bool
Start()
Stop()
}