sharding

package
v2.12.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// LabelOrdinal is name of Prometheus metric label to use in conjunction with kube_state_metrics_shard_ordinal.
	LabelOrdinal = "shard_ordinal"
)

Variables

This section is empty.

Functions

func NewShardedListWatch

func NewShardedListWatch(shard int32, totalShards int, lw cache.ListerWatcher) cache.ListerWatcher

NewShardedListWatch returns a new shardedListWatch via the cache.ListerWatcher interface. In the case of no sharding needed, it returns the provided cache.ListerWatcher

Types

type Metrics added in v2.1.0

type Metrics struct {
	Ordinal *prometheus.GaugeVec
	Total   prometheus.Gauge
}

Metrics stores the pointers of kube_state_metrics_shard_ordinal and kube_state_metrics_total_shards metrics.

func NewShardingMetrics added in v2.1.0

func NewShardingMetrics(r prometheus.Registerer) *Metrics

NewShardingMetrics takes in a prometheus registry and initializes and registers sharding configuration metrics. It returns those registered metrics.

Jump to

Keyboard shortcuts

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