type Gauge … var _ … var _ … var _ … // NewGauge returns an object which satisfies the kubeCollector, Registerable, and Gauge interfaces. // However, the object returned will not measure anything unless the collector is first // registered, since the metric is lazily instantiated. func NewGauge(opts *GaugeOpts) *Gauge { … } // setPrometheusGauge sets the underlying KubeGauge object, i.e. the thing that does the measurement. func (g *Gauge) setPrometheusGauge(gauge prometheus.Gauge) { … } // DeprecatedVersion returns a pointer to the Version or nil func (g *Gauge) DeprecatedVersion() *semver.Version { … } // initializeMetric invocation creates the actual underlying Gauge. Until this method is called // the underlying gauge is a no-op. func (g *Gauge) initializeMetric() { … } // initializeDeprecatedMetric invocation creates the actual (but deprecated) Gauge. Until this method // is called the underlying gauge is a no-op. func (g *Gauge) initializeDeprecatedMetric() { … } // WithContext allows the normal Gauge metric to pass in context. The context is no-op now. func (g *Gauge) WithContext(ctx context.Context) GaugeMetric { … } type GaugeVec … var _ … var _ … var _ … // NewGaugeVec returns an object which satisfies the kubeCollector, Registerable, and GaugeVecMetric interfaces. // However, the object returned will not measure anything unless the collector is first // registered, since the metric is lazily instantiated, and only members extracted after // registration will actually measure anything. func NewGaugeVec(opts *GaugeOpts, labels []string) *GaugeVec { … } // DeprecatedVersion returns a pointer to the Version or nil func (v *GaugeVec) DeprecatedVersion() *semver.Version { … } // initializeMetric invocation creates the actual underlying GaugeVec. Until this method is called // the underlying gaugeVec is a no-op. func (v *GaugeVec) initializeMetric() { … } // initializeDeprecatedMetric invocation creates the actual (but deprecated) GaugeVec. Until this method is called // the underlying gaugeVec is a no-op. func (v *GaugeVec) initializeDeprecatedMetric() { … } func (v *GaugeVec) WithLabelValuesChecked(lvs ...string) (GaugeMetric, error) { … } // WithLabelValues returns the GaugeMetric for the given slice of label // values (same order as the VariableLabels in Desc). If that combination of // label values is accessed for the first time, a new GaugeMetric is created IFF the gaugeVec // has been registered to a metrics registry. func (v *GaugeVec) WithLabelValues(lvs ...string) GaugeMetric { … } func (v *GaugeVec) WithChecked(labels map[string]string) (GaugeMetric, error) { … } // With returns the GaugeMetric for the given Labels map (the label names // must match those of the VariableLabels in Desc). If that label map is // accessed for the first time, a new GaugeMetric is created IFF the gaugeVec has // been registered to a metrics registry. func (v *GaugeVec) With(labels map[string]string) GaugeMetric { … } // Delete deletes the metric where the variable labels are the same as those // passed in as labels. It returns true if a metric was deleted. // // It is not an error if the number and names of the Labels are inconsistent // with those of the VariableLabels in Desc. However, such inconsistent Labels // can never match an actual metric, so the method will always return false in // that case. func (v *GaugeVec) Delete(labels map[string]string) bool { … } // Reset deletes all metrics in this vector. func (v *GaugeVec) Reset() { … } // ResetLabelAllowLists resets the label allow list for the GaugeVec. // NOTE: This should only be used in test. func (v *GaugeVec) ResetLabelAllowLists() { … } func newGaugeFunc(opts *GaugeOpts, function func() float64, v semver.Version) GaugeFunc { … } // NewGaugeFunc creates a new GaugeFunc based on the provided GaugeOpts. The // value reported is determined by calling the given function from within the // Write method. Take into account that metric collection may happen // concurrently. If that results in concurrent calls to Write, like in the case // where a GaugeFunc is directly registered with Prometheus, the provided // function must be concurrency-safe. func NewGaugeFunc(opts *GaugeOpts, function func() float64) GaugeFunc { … } // WithContext returns wrapped GaugeVec with context func (v *GaugeVec) WithContext(ctx context.Context) *GaugeVecWithContext { … } func (v *GaugeVec) InterfaceWithContext(ctx context.Context) GaugeVecMetric { … } type GaugeVecWithContext … // WithLabelValues is the wrapper of GaugeVec.WithLabelValues. func (vc *GaugeVecWithContext) WithLabelValues(lvs ...string) GaugeMetric { … } // With is the wrapper of GaugeVec.With. func (vc *GaugeVecWithContext) With(labels map[string]string) GaugeMetric { … }