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.
Click to show internal directories.
Click to hide internal directories.