MCPcopy Index your code
hub / github.com/coder/coder / FetchVolume

Method FetchVolume

agent/proto/resourcesmonitor/fetcher.go:70–81  ·  view source on GitHub ↗
(volume string)

Source from the content-addressed store, hash-verified

68}
69
70func (f *fetcher) FetchVolume(volume string) (total int64, used int64, err error) {
71 vol, err := f.Disk(clistat.PrefixDefault, volume)
72 if err != nil {
73 return 0, 0, err
74 }
75
76 if vol.Total == nil {
77 return 0, 0, xerrors.New("volume total is nil - can not fetch volume")
78 }
79
80 return int64(*vol.Total), int64(vol.Used), nil
81}

Callers

nothing calls this directly

Calls 2

DiskMethod · 0.65
NewMethod · 0.65

Tested by

no test coverage detected