diskio

package
v0.0.0-...-cb77e8e Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RefreshInterval

func RefreshInterval(interval time.Duration)

RefreshInterval configures the polling frequency.

Types

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