Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Scrapers = map[Scraper]bool{ ScrapeRum{}: true, ScrapeStacks{}: true, } )
Functions ¶
Types ¶
type Exporter ¶
type Exporter struct {
// contains filtered or unexported fields
}
func (*Exporter) Collect ¶
func (e *Exporter) Collect(ch chan<- prometheus.Metric)
Collect implements prometheus.Collector.
func (*Exporter) Describe ¶
func (e *Exporter) Describe(ch chan<- *prometheus.Desc)
type Metrics ¶
type Metrics struct { TotalScrapes prometheus.Counter ScrapeErrors *prometheus.CounterVec Error prometheus.Gauge PulumiServiceUp prometheus.Gauge }
Metrics represents exporter metrics which values can be carried between http requests.
type PulumiServiceClient ¶
type PulumiServiceClient struct { Client *http.Client Opts *PulumiServiceOpts }
func (*PulumiServiceClient) Ping ¶
func (h *PulumiServiceClient) Ping() (bool, error)
type PulumiServiceOpts ¶
type ScrapeRum ¶
type ScrapeRum struct{}
func (ScrapeRum) Scrape ¶
func (ScrapeRum) Scrape(client *PulumiServiceClient, ch chan<- prometheus.Metric) error
Scrape collects data from client and sends it over channel as prometheus metric.
type ScrapeStacks ¶
type ScrapeStacks struct{}
func (ScrapeStacks) Help ¶
func (ScrapeStacks) Help() string
Help describes the role of the Scraper.
func (ScrapeStacks) Scrape ¶
func (ScrapeStacks) Scrape(client *PulumiServiceClient, ch chan<- prometheus.Metric) error
Scrape collects data from client and sends it over channel as prometheus metric.
type Scraper ¶
type Scraper interface { // Name of the Scraper. Should be unique. Name() string // Help describes the role of the Scraper. // Example: "Resources under management for an org." Help() string // Scrape collects data from client and sends it over channel as prometheus metric. Scrape(client *PulumiServiceClient, ch chan<- prometheus.Metric) error }
Scraper is minimal interface that let's you add new prometheus metrics to the exporter.
Click to show internal directories.
Click to hide internal directories.