Add concurrency and id flag for daemon

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2015-12-07 15:19:56 -08:00
parent 9415a4210c
commit d9e8fe62cb
5 changed files with 40 additions and 10 deletions

View File

@@ -3,12 +3,15 @@ package containerd
import "github.com/cloudfoundry/gosigar"
type Machine struct {
ID string
Cpus int
Memory int64
}
func CollectMachineInformation() (Machine, error) {
m := Machine{}
func CollectMachineInformation(id string) (Machine, error) {
m := Machine{
ID: id,
}
cpu := sigar.CpuList{}
if err := cpu.Get(); err != nil {
return m, err