scraper

package
v0.0.0-...-05b72f9 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProbeSuccessMetricName = "probe_success"
	CheckInfoMetricName    = "sm_check_info"
	CheckInfoSource        = "synthetic-monitoring-agent"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Incrementer

type Incrementer interface {
	Inc()
}

type IncrementerVec

type IncrementerVec interface {
	WithLabelValues(...string) Incrementer
}

func NewIncrementerFromCounterVec

func NewIncrementerFromCounterVec(c *prometheus.CounterVec) IncrementerVec

type Scraper

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

func New

func New(ctx context.Context, check model.Check, publisher pusher.Publisher, probe sm.Probe, logger zerolog.Logger, scrapeCounter Incrementer, errorCounter IncrementerVec, k6runner k6runner.Runner) (*Scraper, error)

func NewWithOpts

func NewWithOpts(ctx context.Context, check model.Check, opts ScraperOpts) (*Scraper, error)

func (Scraper) CheckType

func (s Scraper) CheckType() sm.CheckType

func (Scraper) ConfigVersion

func (s Scraper) ConfigVersion() string

func (Scraper) LastModified

func (s Scraper) LastModified() float64

func (*Scraper) Run

func (s *Scraper) Run(ctx context.Context)

func (*Scraper) Stop

func (s *Scraper) Stop()

type ScraperOpts

type ScraperOpts struct {
	Probe         sm.Probe
	Publisher     pusher.Publisher
	Logger        zerolog.Logger
	ScrapeCounter Incrementer
	ErrorCounter  IncrementerVec
	ProbeFactory  prober.ProberFactory
}

type Streams

type Streams = []logproto.Stream

type TimeSeries

type TimeSeries = []prompb.TimeSeries

Jump to

Keyboard shortcuts

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