Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Scraper ¶
type Scraper struct {
// contains filtered or unexported fields
}
Scraper is a
func NewScraper ¶
func NewScraper(conf ScraperConfig) *Scraper
NewScraper returns a Scraper with the provided configuration.
type ScraperConfig ¶
type ScraperConfig struct {
Clock clockwork.Clock
// ExporterURL is the URL that hosts the metrics page for a Prometheus
// exporter.
ExporterURL string
// NodeID is the ID of the node associated with the generated
// NetworkStatsReports.
NodeID string
// ScrapeInterval is how frequently the scraper should scrape metrics.
ScrapeInterval time.Duration
// Callback gets called once a NetworkStatsReport is generated. A non-nil
// error will stop the scraper.
Callback func(*apipb.NetworkStatsReport) error
}
ScraperConfig represents the configuration for a prometheus scraper.
Click to show internal directories.
Click to hide internal directories.