metrics

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

type Metrics struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Metrics implements collecting, caching and processing of raw metrics.

func NewMetrics

func NewMetrics(opts Options) (*Metrics, error)

NewMetrics creates a new instance for metrics collecting and processing.

func (*Metrics) Gather

func (m *Metrics) Gather() ([]*model.MetricFamily, error)

Gather is our prometheus.Gatherer interface for proxying metrics.

func (*Metrics) Start

func (m *Metrics) Start() error

Start starts metrics collection and processing.

func (*Metrics) Stop

func (m *Metrics) Stop()

Stop stops metrics collection and processing.

type Options

type Options struct {
	// PollInterval is the interval for polling raw metrics.
	PollInterval time.Duration
}

Options describes options for metrics collection and processing.

Jump to

Keyboard shortcuts

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