MCPcopy Index your code
hub / github.com/koding/kite / New

Function New

systeminfo/systeminfo.go:41–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

39}
40
41func New() (*info, error) {
42 disk, err := diskStats()
43 if err != nil {
44 return nil, err
45 }
46
47 mem, err := memoryStats()
48 if err != nil {
49 return nil, err
50 }
51
52 return &info{
53 State: "RUNNING", // needed for client side compatibility
54 DiskUsage: disk.Usage,
55 DiskTotal: disk.Total,
56 MemoryUsage: mem.Usage,
57 MemoryTotal: mem.Total,
58 HomeDir: homeDir(),
59 Uname: runtime.GOOS,
60 }, nil
61}

Callers 1

TestInfoFunction · 0.70

Calls 3

homeDirFunction · 0.85
diskStatsFunction · 0.70
memoryStatsFunction · 0.70

Tested by 1

TestInfoFunction · 0.56