app

package
v0.0.0-...-887bc09 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	UseRFC3339 bool `env:"USE_RFC3339"`
	// Loggregator Agent Certs
	ClientKeyPath  string `env:"CLIENT_KEY_PATH, report, required"`
	ClientCertPath string `env:"CLIENT_CERT_PATH, report, required"`
	CACertPath     string `env:"CA_CERT_PATH, report, required"`

	// Prom Scraper Certs
	ScrapeKeyPath    string `env:"SCRAPE_KEY_PATH, report"`
	ScrapeCertPath   string `env:"SCRAPE_CERT_PATH, report"`
	ScrapeCACertPath string `env:"SCRAPE_CA_CERT_PATH, report"`

	LoggregatorIngressAddr string        `env:"LOGGREGATOR_AGENT_ADDR, report, required"`
	DefaultSourceID        string        `env:"DEFAULT_SOURCE_ID, report, required"`
	ConfigGlobs            []string      `env:"CONFIG_GLOBS, report"`
	DefaultScrapeInterval  time.Duration `env:"SCRAPE_INTERVAL, report"`
	SkipSSLValidation      bool          `env:"SKIP_SSL_VALIDATION, report"`

	MetricsServer config.MetricsServer
}

func LoadConfig

func LoadConfig(log *log.Logger) Config

type ConfigProvider

type ConfigProvider func() ([]scraper.PromScraperConfig, error)

type PromScraper

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

func NewPromScraper

func NewPromScraper(cfg Config, configProvider ConfigProvider, m promRegistry, log *log.Logger) *PromScraper

func (*PromScraper) Run

func (p *PromScraper) Run()

func (*PromScraper) Stop

func (p *PromScraper) Stop()

Stops cancel future scrapes and wait for any current scrapes to complete

Jump to

Keyboard shortcuts

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