monitor

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package monitor provides cross-platform bandwidth monitoring functionality

This package provides bandwidth monitoring capabilities using the gopsutil library to gather network interface statistics across different platforms.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BandwidthMonitor

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

BandwidthMonitor handles cross-platform bandwidth monitoring

func NewBandwidthMonitor

func NewBandwidthMonitor() *BandwidthMonitor

NewBandwidthMonitor creates a new bandwidth monitor

func (*BandwidthMonitor) GetCurrentRates

func (bm *BandwidthMonitor) GetCurrentRates() (uint64, uint64, error)

GetCurrentRates returns the current upload and download rates

type BandwidthRates

type BandwidthRates struct {
	Upload   uint64 // bytes per second
	Download uint64 // bytes per second
}

BandwidthRates represents current upload/download rates

Jump to

Keyboard shortcuts

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