Windows will not use containerd and its just unused code and unneed complexity to keep it all around. Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
		
			
				
	
	
		
			24 lines
		
	
	
		
			417 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			417 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package supervisor
 | 
						|
 | 
						|
import "github.com/cloudfoundry/gosigar"
 | 
						|
 | 
						|
type Machine struct {
 | 
						|
	Cpus   int
 | 
						|
	Memory int64
 | 
						|
}
 | 
						|
 | 
						|
func CollectMachineInformation() (Machine, error) {
 | 
						|
	m := Machine{}
 | 
						|
	cpu := sigar.CpuList{}
 | 
						|
	if err := cpu.Get(); err != nil {
 | 
						|
		return m, err
 | 
						|
	}
 | 
						|
	m.Cpus = len(cpu.List)
 | 
						|
	mem := sigar.Mem{}
 | 
						|
	if err := mem.Get(); err != nil {
 | 
						|
		return m, err
 | 
						|
	}
 | 
						|
	m.Memory = int64(mem.Total / 1024 / 1024)
 | 
						|
	return m, nil
 | 
						|
}
 |