controlplane

package
v3.26.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComponentName

type ComponentName string

ComponentName is a typed name for components.

const (
	// Scheduler is the Kubernetes Scheduler
	Scheduler ComponentName = "scheduler"
	// Etcd is the Kubernetes etcd
	Etcd ComponentName = "etcd"
	// ControllerManager is the Kubernetes controller manager
	ControllerManager ComponentName = "controller-manager"
	// APIServer is the Kubernetes apiserver
	APIServer ComponentName = "api-server"
)

type Providers

type Providers struct {
	K8s kubernetes.Interface
}

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

type Scraper

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

Scraper takes care of getting metrics all control plane instances based on the configuration.

func NewScraper

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

NewScraper initialize its internal informers and components. After use, informers should be closed by calling Close().

func (*Scraper) Close

func (s *Scraper) Close()

Close will signal internal informers to stop running.

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 WithLogger

func WithLogger(logger *log.Logger) ScraperOpt

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

func WithRestConfig

func WithRestConfig(restConfig *rest.Config) ScraperOpt

WithRestConfig returns an OptionFunc to change the restConfig from default empty config.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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