Help us shape the future of Go! Take the 2026 Go Developer Survey

diskmonitor

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiskMonitor

type DiskMonitor struct {
	services.Service
	// contains filtered or unexported fields
}

DiskMonitor measures dirPath on a fixed interval and records total file bytes to gaugeName.

func NewDiskMonitor

func NewDiskMonitor(lggr logger.Logger, dirPath string, gaugeName string, tickInterval time.Duration, opts ...Option) (*DiskMonitor, error)

NewDiskMonitor returns a DiskMonitor for dirPath using gaugeName at tickInterval.

type Option

type Option func(*DiskMonitor)

Option configures a DiskMonitor.

func WithPrometheusGauge

func WithPrometheusGauge(g float64Gauge) Option

WithPrometheusGauge mirrors OTel gauge samples to a Prometheus gauge (e.g. node /metrics).

Jump to

Keyboard shortcuts

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