rename metrics subpackage

This commit is contained in:
Bradley Cicenas
2017-06-27 15:46:03 +00:00
parent bfa5c5944f
commit 2d284d9277
8 changed files with 32 additions and 32 deletions

View File

@@ -2,7 +2,7 @@ package compact
import (
"github.com/bcicen/ctop/logging"
"github.com/bcicen/ctop/metrics"
"github.com/bcicen/ctop/models"
ui "github.com/gizak/termui"
)
@@ -59,7 +59,7 @@ func (row *Compact) SetMeta(k, v string) {
}
}
func (row *Compact) SetMetrics(m metrics.Metrics) {
func (row *Compact) SetMetrics(m models.Metrics) {
row.SetCPU(m.CPUUtil)
row.SetNet(m.NetRx, m.NetTx)
row.SetMem(m.MemUsage, m.MemLimit, m.MemPercent)

View File

@@ -2,7 +2,7 @@ package expanded
import (
"github.com/bcicen/ctop/logging"
"github.com/bcicen/ctop/metrics"
"github.com/bcicen/ctop/models"
ui "github.com/gizak/termui"
)
@@ -55,7 +55,7 @@ func (e *Expanded) Down() {
func (e *Expanded) SetWidth(w int) { e.Width = w }
func (e *Expanded) SetMeta(k, v string) { e.Info.Set(k, v) }
func (e *Expanded) SetMetrics(m metrics.Metrics) {
func (e *Expanded) SetMetrics(m models.Metrics) {
e.Cpu.Update(m.CPUUtil)
e.Net.Update(m.NetRx, m.NetTx)
e.Mem.Update(int(m.MemUsage), int(m.MemLimit))

View File

@@ -2,12 +2,12 @@ package cwidgets
import (
"github.com/bcicen/ctop/logging"
"github.com/bcicen/ctop/metrics"
"github.com/bcicen/ctop/models"
)
var log = logging.Init()
type WidgetUpdater interface {
SetMeta(string, string)
SetMetrics(metrics.Metrics)
SetMetrics(models.Metrics)
}