diskstatsreader

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package diskstatsreader provides functionality for collecting OS disk metrics.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileReader

type FileReader func(string) ([]byte, error)

FileReader is a function type matching the signature for os.ReadFile.

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

A Reader is capable of reading disk statistics from the OS.

Due to the assignment of required unexported fields, a Reader must be initialized with New() instead of as a struct literal.

func New

func New(os string, fileReader FileReader, execute commandlineexecutor.Execute) *Reader

New instantiates a Reader with the capability to read disk metrics from linux and windows operating systems.

func (*Reader) Read

Read reads disk metrics from the OS and returns a collection of disk stats by device mapping.

Jump to

Keyboard shortcuts

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