Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigProvider ¶
type ConfigProvider struct {
// contains filtered or unexported fields
}
func NewConfigProvider ¶
func (*ConfigProvider) Configs ¶
func (p *ConfigProvider) Configs() ([]PromScraperConfig, error)
type MetricsEmitter ¶
type MetricsEmitter interface {
EmitGauge(opts ...loggregator.EmitGaugeOption)
EmitCounter(name string, opts ...loggregator.EmitCounterOption)
}
type MetricsGetter ¶
type PromScraperConfig ¶
type PromScraperConfig struct {
Port string `yaml:"port"`
SourceID string `yaml:"source_id"`
InstanceID string `yaml:"instance_id"`
Scheme string `yaml:"scheme"`
ServerName string `yaml:"server_name"`
Path string `yaml:"path"`
Headers map[string]string `yaml:"headers"`
Labels map[string]string `yaml:"labels"`
CaPath string `yaml:"ca_path"`
ClientKeyPath string `yaml:"client_key_path"`
ClientCertPath string `yaml:"client_cert_path"`
ScrapeInterval time.Duration `yaml:"scrape_interval"`
}
type ScrapeError ¶
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 New( t TargetProvider, e MetricsEmitter, sc MetricsGetter, defaultID string, opts ...ScrapeOption, ) *Scraper
type ScraperError ¶
type ScraperError struct {
Errors []*ScrapeError
}
func (*ScraperError) Error ¶
func (e *ScraperError) Error() string
type TargetProvider ¶
type TargetProvider func() []Target
func NewDNSScrapeTargetProvider ¶
func NewDNSScrapeTargetProvider(sourceID, dnsFile string, port int) TargetProvider
Click to show internal directories.
Click to hide internal directories.