kubernetes/staging/src/k8s.io/component-base/metrics/metric.go

type kubeCollector

type lazyKubeMetric

type lazyMetric

func (r *lazyMetric) IsCreated() bool {}

// lazyInit provides the lazyMetric with a reference to the kubeCollector it is supposed
// to allow lazy initialization for. It should be invoked in the factory function which creates new
// kubeCollector type objects.
func (r *lazyMetric) lazyInit(self kubeCollector, fqName string) {}

// preprocessMetric figures out whether the lazy metric should be hidden or not.
// This method takes a Version argument which should be the version of the binary in which
// this code is currently being executed. A metric can be hidden under two conditions:
//  1. if the metric is deprecated and is outside the grace period (i.e. has been
//     deprecated for more than one release
//  2. if the metric is manually disabled via a CLI flag.
//
// Disclaimer:  disabling a metric via a CLI flag has higher precedence than
// deprecation and will override show-hidden-metrics for the explicitly
// disabled metric.
func (r *lazyMetric) preprocessMetric(version semver.Version) {}

func (r *lazyMetric) IsHidden() bool {}

func (r *lazyMetric) IsDeprecated() bool {}

// Create forces the initialization of metric which has been deferred until
// the point at which this method is invoked. This method will determine whether
// the metric is deprecated or hidden, no-opting if the metric should be considered
// hidden. Furthermore, this function no-opts and returns true if metric is already
// created.
func (r *lazyMetric) Create(version *semver.Version) bool {}

// ClearState will clear all the states marked by Create.
// It intends to be used for re-register a hidden metric.
func (r *lazyMetric) ClearState() {}

// FQName returns the fully-qualified metric name of the collector.
func (r *lazyMetric) FQName() string {}

type selfCollector

func (c *selfCollector) initSelfCollection(m prometheus.Metric) {}

func (c *selfCollector) Describe(ch chan<- *prometheus.Desc) {}

func (c *selfCollector) Collect(ch chan<- prometheus.Metric) {}

type metricWithExemplar

var noopCounterVec

var noopHistogramVec

var noopTimingHistogramVec

var noopGaugeVec

var noop

type noopMetric

func (noopMetric) Inc()                              {}

func (noopMetric) Add(float64)                       {}

func (noopMetric) Dec()                              {}

func (noopMetric) Set(float64)                       {}

func (noopMetric) Sub(float64)                       {}

func (noopMetric) Observe(float64)                   {}

func (noopMetric) ObserveWithWeight(float64, uint64) {}

func (noopMetric) SetToCurrentTime()                 {}

func (noopMetric) Desc() *prometheus.Desc            {}

func (noopMetric) Write(*dto.Metric) error           {}

func (noopMetric) Describe(chan<- *prometheus.Desc)  {}

func (noopMetric) Collect(chan<- prometheus.Metric)  {}