add interval refresh of running/killed containers in map

This commit is contained in:
Bradley Cicenas
2017-01-26 00:53:03 +00:00
parent 330ba8e188
commit 1705acf506
4 changed files with 30 additions and 2 deletions

View File

@@ -33,6 +33,8 @@ func NewDocker(client *api.Client, id string) *Docker {
}()
go func() {
defer close(stats)
defer close(c.stream)
for s := range stats {
c.ReadCPU(s)
c.ReadMem(s)