kubestatemetrics

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunServer

func RunServer(config ServerConfig, getter ClusterMetricsWriterListGetter)

Types

type ClusterMetricsWriterListGetter

type ClusterMetricsWriterListGetter interface {
	GetMetricsWriterList() map[string]metricsstore.MetricsWriterList
}

type LandingPageHandler

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

func (*LandingPageHandler) ServeHTTP

func (h *LandingPageHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type MetricsHandler

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

MetricsHandler is a http.Handler that exposes the main kube-state-metrics /metrics endpoint. It allows concurrent reconfiguration at runtime.

func NewMetricsHandler

func NewMetricsHandler(getter ClusterMetricsWriterListGetter, diableGZIPEncoding bool) *MetricsHandler

New creates and returns a new MetricsHandler with the given options.

func (*MetricsHandler) ServeHTTP

func (m *MetricsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP implements the http.Handler interface. It writes all generated metrics to the response body.

type MetricsStore

type MetricsStore struct {
	*metricsstore.MetricsStore
	// contains filtered or unexported fields
}

func (*MetricsStore) Add

func (store *MetricsStore) Add(obj interface{}) error

func (*MetricsStore) Delete

func (store *MetricsStore) Delete(obj interface{}) error

func (*MetricsStore) Replace

func (store *MetricsStore) Replace(list []interface{}, rv string) error

func (*MetricsStore) Update

func (store *MetricsStore) Update(obj interface{}) error

type MetricsStoreBuilder

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

func (*MetricsStoreBuilder) GetMetricStore

func (builder *MetricsStoreBuilder) GetMetricStore(cluster string, resource schema.GroupVersionResource) *MetricsStore

type MetricsStoreBuilderConfig

type MetricsStoreBuilderConfig struct {
	MetricAllowlist options.MetricSet
	MetricDenylist  options.MetricSet
	MetricOptInList options.MetricSet

	Resources          options.ResourceSet
	Namespaces         options.NamespaceList
	NamespacesDenylist options.NamespaceList
}

func (*MetricsStoreBuilderConfig) New

type Options

type Options struct {
	EnableKubeStateMetrics bool

	Host string
	Port int

	MetricAllowlist options.MetricSet
	MetricDenylist  options.MetricSet
	MetricOptInList options.MetricSet

	Resources          options.ResourceSet
	Namespaces         options.NamespaceList
	NamespacesDenylist options.NamespaceList
}

func NewOptions

func NewOptions() *Options

func (*Options) AddFlags

func (o *Options) AddFlags(fs *pflag.FlagSet)

func (*Options) MetricsStoreBuilderConfig

func (o *Options) MetricsStoreBuilderConfig() *MetricsStoreBuilderConfig

func (*Options) ServerConfig

func (o *Options) ServerConfig(config metrics.Config) *ServerConfig

func (*Options) Validate

func (o *Options) Validate() []error

type ServerConfig

type ServerConfig struct {
	Endpoint            string
	TLSConfig           string
	DisableGZIPEncoding bool
}

Jump to

Keyboard shortcuts

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