collector

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

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

func NewCollector

func NewCollector(cacheTime time.Duration, speedtest speedtest.Speedtest) (*Collector, error)

Create new instance of collector, returns error if an instance of speedtest is not provided Arguments:

cacheTime: Minimum time between speedtest runs
instance: Name of this instance, provided as label on all metrics
speedtest: Instance of speedtest to use for collection metrics

func (*Collector) Collect

func (c *Collector) Collect(ch chan<- prometheus.Metric)

Implements the Collect function for prometheus.Collector

func (*Collector) Describe

func (c *Collector) Describe(ch chan<- *prometheus.Desc)

Implements the Describe function for prometheus.Collector

type ErrNoSpeedtest

type ErrNoSpeedtest struct{}

func (ErrNoSpeedtest) Error

func (e ErrNoSpeedtest) Error() string

Jump to

Keyboard shortcuts

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