v0.0.0-...-87682d9 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 13 Imported by: 4



Package diskio implements an i3bar module to show disk IO rates.



This section is empty.


This section is empty.


func RefreshInterval

func RefreshInterval(interval time.Duration)

RefreshInterval configures the polling frequency.


type IO

type IO struct {
	Input, Output unit.Datarate
	// contains filtered or unexported fields

IO represents input and output rates for a disk.

func (IO) Total

func (i IO) Total() unit.Datarate

Total gets the total IO rate (input + output).

type Module

type Module struct {
	// contains filtered or unexported fields

Module represents a bar.Module for a single disk's io activity.

func New

func New(disk string) *Module

New creates a diskio module that displays disk io rates for the given disk.

func (*Module) Output

func (m *Module) Output(outputFunc func(IO) bar.Output) *Module

Output configures a module to display the output of a user-defined function.

func (*Module) Stream

func (m *Module) Stream(s bar.Sink)

Stream starts the module. Note that diskio updates begin as soon as the first module is constructed, even if no modules are streaming.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL