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 ¶
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.