prom

package
v0.0.0-...-4c9dc9c Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Poller

type Poller struct {
	// URL that the poller should scrape.
	URL *url.URL

	// Interval is the amount of time that should pass between scrapes.
	Interval time.Duration

	// AcceptHeader is used to negotiate the exposition format from the
	// Prometheus endpoint.
	AcceptHeader string

	// Inbox is the channel to use to observe scraped measurements.
	Inbox chan *ag.Measurement

	// Debug is used to turn on extended logging, useful for debugging
	// purposes.
	Debug bool
}

Poller defined parameters for scraping a Prometheus endpoint, over HTTP.

func (Poller) Poll

func (p Poller) Poll(ctx context.Context)

Poll performs a scrape of the Prometheus endpoint every Poller.Interval. The measurements found while scraping will be sent to Poller.Inbox.

Jump to

Keyboard shortcuts

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