func New(disk string) *Module {
	construct()
	lock.Lock()
	defer lock.Unlock()
	mInfo, found := modules[disk]
	if !found {
		mInfo = &diskInfo{}
		modules[disk] = mInfo
	}
	m := &Module{ioChan: mInfo.makeChannel()}
	l.Label(m, disk)
	l.Register(m, "ioChan", "outputFunc")
	m.Output(func(i IO) bar.Output {
		return outputs.Textf("Disk: %s", format.IByterate(i.Total()))
	})
	return m
}
New creates a diskio module that displays disk io rates for the given disk.
package diskio  
import (
	"bufio"
	"strconv"
	"strings"
	"sync"
	"time"
	"barista.run/bar"
	"barista.run/base/value"
	"barista.run/format"
	l "barista.run/logging"
	"barista.run/outputs"
	"barista.run/timing"
	"github.com/martinlindhe/unit"
	"github.com/spf13/afero"
)
type IO struct {
	Input, Output unit.Datarate
	shouldOutput bool
	err          error
}
func (i IO) Total() unit.Datarate {
	return i.Input + i.Output
}
type diskInfo struct {
	ioChan     chan<- IO
	lastIO     *IO
	lastRead   uint64
	lastWrite  uint64
	updateTime time.Time
}
var once sync.Once
var lock sync.Mutex
var modules map[string]*diskInfo
var updater *timing.Scheduler
func construct() {
	once.Do(func() {
		modules = make(map[string]*diskInfo)
		updater = timing.NewScheduler()
		l.Attach(nil, updater, "diskio.updater")
		updater.Every(3 * time.Second)
		update()
		go func(updater *timing.Scheduler) {
			for range updater.C {
				update()
			}
		}(updater)
	})
}
func RefreshInterval(interval time.Duration) {
	construct()
	updater.Every(interval)
}
type Module struct {
	ioChan     <-chan IO
	outputFunc value.Value
}