kubelet

package
v3.29.4 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Providers

type Providers struct {
	K8s      kubernetes.Interface
	Kubelet  client.HTTPGetter
	CAdvisor prometheus.MetricFamiliesGetFunc
}

Providers is a struct holding pointers to all the clients Scraper needs to get data from. TODO: Extract this out of the Kubelet package.

type Scraper

type Scraper struct {
	Providers

	Filterer discovery.NamespaceFilterer
	// contains filtered or unexported fields
}

Scraper takes care of getting metrics from an autodiscovered Kubelet instance.

func NewScraper

func NewScraper(config *config.Config, providers Providers, options ...ScraperOpt) (*Scraper, error)

NewScraper builds a new Scraper, initializing its internal informers. After use, informers should be closed by calling Close() to prevent resource leakage.

func (*Scraper) Close

func (s *Scraper) Close()

Close will signal internal informers to stop running.

func (*Scraper) IncCurrentReruns added in v3.7.0

func (s *Scraper) IncCurrentReruns()

Increase the kubelet currentReruns counter.

func (*Scraper) IsMaxRerunReached added in v3.7.0

func (s *Scraper) IsMaxRerunReached() bool

Check whether the max number of kubulet scraper reruns has been reached or not.

func (*Scraper) Run

func (s *Scraper) Run(i *integration.Integration) error

Run scraper collect the data populating the integration entities

type ScraperOpt

type ScraperOpt func(s *Scraper) error

ScraperOpt are options that can be used to configure the Scraper

func WithFilterer added in v3.3.0

func WithFilterer(filterer discovery.NamespaceFilterer) ScraperOpt

WithFilterer returns an OptionFunc to add a Filterer.

func WithLogger

func WithLogger(logger *log.Logger) ScraperOpt

WithLogger returns an OptionFunc to change the logger from the default noop logger.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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