var _ … type metricsDu … // NewMetricsDu creates a new metricsDu with the Volume path. func NewMetricsDu(path string) MetricsProvider { … } // GetMetrics calculates the volume usage and device free space by executing "du" // and gathering filesystem info for the Volume path. // See MetricsProvider.GetMetrics func (md *metricsDu) GetMetrics() (*Metrics, error) { … } // getDiskUsage writes metrics.Used and metric.InodesUsed from fs.DiskUsage func (md *metricsDu) getDiskUsage(metrics *Metrics) error { … } // getFsInfo writes metrics.Capacity and metrics.Available from the filesystem // info func (md *metricsDu) getFsInfo(metrics *Metrics) error { … }