custom

package
v0.0.0-...-ddcacec Latest Latest
Warning

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

Go to latest
Published: May 27, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CollectorScheduler

type CollectorScheduler struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

CollectorScheduler is a scheduler for running metric collection jobs. It keeps track of all running collectors and stops them if they are to be removed.

func NewCollectorScheduler

func NewCollectorScheduler(ctx context.Context, metricsc chan<- metricCollection) *CollectorScheduler

NewCollectorScheduler initializes a new CollectorScheduler.

func (*CollectorScheduler) Add

func (t *CollectorScheduler) Add(resourceRef resourceReference, typeName collector.MetricTypeName, metricCollector collector.Collector)

Add adds a new collector to the collector scheduler. Once the collector is added it will be started to collect metrics.

func (*CollectorScheduler) Remove

func (t *CollectorScheduler) Remove(resourceRef resourceReference)

Remove removes a collector from the Collector scheduler. The collector is stopped before it's removed.

type HPAProvider

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

HPAProvider is a base provider for initializing metric collectors based on HPA resources.

func NewHPAProvider

func NewHPAProvider(client kubernetes.Interface, interval, collectorInterval time.Duration, collectorFactory *collector.CollectorFactory) *HPAProvider

NewHPAProvider ...

func (*HPAProvider) GetExternalMetric

func (h *HPAProvider) GetExternalMetric(namespace string, metricSelector labels.Selector, info provider.ExternalMetricInfo) (*external_metrics.ExternalMetricValueList, error)

GetExternalMetric ...

func (*HPAProvider) ListAllExternalMetrics

func (h *HPAProvider) ListAllExternalMetrics() []provider.ExternalMetricInfo

ListAllExternalMetrics ...

func (*HPAProvider) Run

func (h *HPAProvider) Run(ctx context.Context)

Run runs the HPA resource discovery and metric collection.

Jump to

Keyboard shortcuts

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