collector

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2022 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 Collector

type Collector struct {
	Pinger   *pinger.Pinger
	Trackers map[string]*tracker.Tracker
	Packets  chan pinger.Response
}

Collector pings a number of hosts and measures latency & packet loss

func New

func New(hosts []string) (monitor *Collector)

New creates a Collector for the specified hosts

func (*Collector) Collect

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

Collect implements the Prometheus Collector interface

func (*Collector) Describe

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

Describe implements the Prometheus Collector interface

func (*Collector) Run

func (c *Collector) Run(ctx context.Context)

Run starts the collector(s)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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