metrics

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

func New

func New(cfg *config.Config) *Manager

func (*Manager) AddBytes

func (m *Manager) AddBytes(n int64)

func (*Manager) Close

func (m *Manager) Close()

Close stops background metric collection and flushes the latest values to disk.

func (*Manager) IncActive

func (m *Manager) IncActive(n int64)

func (*Manager) IncDownloadsSuccess

func (m *Manager) IncDownloadsSuccess()

func (*Manager) IncRetries

func (m *Manager) IncRetries(n int64)

func (*Manager) ObserveDownloadSeconds

func (m *Manager) ObserveDownloadSeconds(sec float64)

func (*Manager) Start

func (m *Manager) Start()

Start begins periodically writing metrics to the configured file.

func (*Manager) Write

func (m *Manager) Write() error

Jump to

Keyboard shortcuts

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