add WidgetUpdater interface to container, replace struct fields with metamap

This commit is contained in:
Bradley Cicenas
2017-03-06 08:25:59 +00:00
parent e1dc42db03
commit f102e48cc9
8 changed files with 48 additions and 42 deletions

View File

@@ -2,19 +2,12 @@ package cwidgets
import (
"github.com/bcicen/ctop/logging"
ui "github.com/gizak/termui"
"github.com/bcicen/ctop/metrics"
)
var log = logging.Init()
type ContainerWidgets interface {
Buffer() ui.Buffer
Highlight()
UnHighlight()
SetY(int)
SetWidth(int)
SetStatus(string)
SetCPU(int)
SetNet(int64, int64)
SetMem(int64, int64, int)
type WidgetUpdater interface {
SetMeta(string, string)
SetMetrics(metrics.Metrics)
}