mirror of
https://github.com/bcicen/ctop.git
synced 2025-12-06 15:16:41 +08:00
add WidgetUpdater interface to container, replace struct fields with metamap
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user