scraper

package
v0.0.0-...-14308cf Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2019 License: Apache-2.0 Imports: 15 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MetricsEmitter

type MetricsEmitter interface {
	EmitGauge(opts ...loggregator.EmitGaugeOption)
	EmitCounter(name string, opts ...loggregator.EmitCounterOption)
}

type MetricsGetter

type MetricsGetter func(addr string, headers map[string]string) (*http.Response, error)

type ScrapeError

type ScrapeError struct {
	ID         string
	InstanceID string
	MetricURL  string
	Err        error
}

func (*ScrapeError) Error

func (e *ScrapeError) Error() string

type ScrapeOption

type ScrapeOption func(s *Scraper)

func WithMetricsClient

func WithMetricsClient(m metricsClient) ScrapeOption

type Scraper

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

func New

func (*Scraper) Scrape

func (s *Scraper) Scrape() error

type ScraperError

type ScraperError struct {
	Errors []*ScrapeError
}

func (*ScraperError) Error

func (e *ScraperError) Error() string

type Target

type Target struct {
	ID         string
	InstanceID string
	MetricURL  string
	Headers    map[string]string
}

type TargetProvider

type TargetProvider func() []Target

func NewDNSScrapeTargetProvider

func NewDNSScrapeTargetProvider(sourceID, dnsFile string, port int) TargetProvider

Jump to

Keyboard shortcuts

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