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

@@ -21,7 +21,9 @@ func logEvent(e ui.Event) {
// log container, metrics, and widget state
func dumpContainer(c *Container) {
msg := fmt.Sprintf("logging state for container: %s\n", c.Id)
msg += fmt.Sprintf("Id = %s\nname = %s\nstate = %s\n", c.Id, c.Name, c.State)
for k, v := range c.Meta {
msg += fmt.Sprintf("Meta.%s = %s\n", k, v)
}
msg += inspect(&c.Metrics)
log.Infof(msg)
}