disk

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMetricsHandler

func NewMetricsHandler(path string) http.Handler

NewMetricsHandler returns a http.Handler for the given path.

Types

type Status

type Status struct {
	BytesTotal  uint64 `json:"bytes_total"`
	BytesUsed   uint64 `json:"bytes_used"`
	BytesFree   uint64 `json:"bytes_free"`
	InodesTotal uint64 `json:"inodes_total"`
	InodesUsed  uint64 `json:"inodes_used"`
	InodesFree  uint64 `json:"inodes_free"`
}

Status contains disk informations.

func Usage

func Usage(path string) (*Status, error)

Usage returns the free, used and total bytes and inodes for the given path.

Jump to

Keyboard shortcuts

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