Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewInstrumentedListerWatcher ¶
func NewInstrumentedListerWatcher(lw cache.ListerWatcher, metrics *ListWatchMetrics, resource string, useAPIServerCache bool) cache.ListerWatcher
NewInstrumentedListerWatcher returns a new InstrumentedListerWatcher.
Types ¶
type InstrumentedListerWatcher ¶
type InstrumentedListerWatcher struct {
// contains filtered or unexported fields
}
InstrumentedListerWatcher provides the kube_state_metrics_watch_total metric with a cache.ListerWatcher obj and the related resource.
func (*InstrumentedListerWatcher) List ¶
func (i *InstrumentedListerWatcher) List(options metav1.ListOptions) (res runtime.Object, err error)
List is a wrapper func around the cache.ListerWatcher.List func. It increases the success/error / counters based on the outcome of the List operation it instruments.
func (*InstrumentedListerWatcher) Watch ¶
func (i *InstrumentedListerWatcher) Watch(options metav1.ListOptions) (res watch.Interface, err error)
Watch is a wrapper func around the cache.ListerWatcher.Watch func. It increases the success/error counters based on the outcome of the Watch operation it instruments.
type ListWatchMetrics ¶
type ListWatchMetrics struct { WatchTotal *prometheus.CounterVec ListTotal *prometheus.CounterVec }
ListWatchMetrics stores the pointers of kube_state_metrics_[list|watch]_total metrics.
func NewListWatchMetrics ¶
func NewListWatchMetrics(r prometheus.Registerer) *ListWatchMetrics
NewListWatchMetrics takes in a prometheus registry and initializes and registers the kube_state_metrics_list_total and kube_state_metrics_watch_total metrics. It returns those registered metrics.