1
0
mirror of https://github.com/bingohuang/docker-labs.git synced 2025-10-05 09:53:21 +08:00

Show cpu and memory stats of every node

This commit is contained in:
Jonathan Leibiusky @xetorthio
2016-11-18 13:52:47 -03:00
parent bc7dbead33
commit 8b0749a9ba
6 changed files with 121 additions and 7 deletions

View File

@@ -1,6 +1,7 @@
package services
import (
"io"
"log"
"strings"
@@ -28,6 +29,12 @@ func init() {
}
func GetContainerStats(id string) (io.ReadCloser, error) {
stats, err := c.ContainerStats(context.Background(), id, true)
return stats.Body, err
}
func GetContainerInfo(id string) (types.ContainerJSON, error) {
return c.ContainerInspect(context.Background(), id)
}