watch

package
v2.0.0-beta.0...-3bc1883 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInstrumentedListerWatcher

func NewInstrumentedListerWatcher(lw cache.ListerWatcher, metrics *ListWatchMetrics, resource string) 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.

Jump to

Keyboard shortcuts

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