metricsadapter

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// NamespacesGVR is the gvr of namespaces
	NamespacesGVR = corev1.SchemeGroupVersion.WithResource("namespaces")
)

Functions

This section is empty.

Types

type MetricsAdapter

type MetricsAdapter struct {
	basecmd.AdapterBase

	*provider.ResourceMetricsProvider
}

MetricsAdapter is a metrics adapter to provider native metrics, custom metrics and external metrics

func NewMetricsAdapter

func NewMetricsAdapter(controller *MetricsController, customMetricsAdapterServerOptions *options.CustomMetricsAdapterServerOptions) *MetricsAdapter

NewMetricsAdapter creates a new metrics adapter

type MetricsController

type MetricsController struct {
	InformerFactory       informerfactory.SharedInformerFactory
	ClusterLister         clusterlister.ClusterLister
	InformerManager       genericmanager.MultiClusterInformerManager
	MultiClusterDiscovery multiclient.MultiClusterDiscoveryInterface
	// contains filtered or unexported fields
}

MetricsController is a controller for metrics, control the lifecycle of multi-clusters informer

func NewMetricsController

func NewMetricsController(restConfig *rest.Config, factory informerfactory.SharedInformerFactory, kubeFactory informers.SharedInformerFactory) *MetricsController

NewMetricsController creates a new metrics controller

type MetricsServer

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

MetricsServer is a metrics server

func NewMetricsServer

func NewMetricsServer(controller *MetricsController, metricsAdapter *MetricsAdapter) *MetricsServer

NewMetricsServer creates a new metrics server

func (*MetricsServer) StartServer

func (m *MetricsServer) StartServer(stopCh <-chan struct{}) error

StartServer starts the metrics server

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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