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

type StableCollector

type BaseStableCollector

// DescribeWithStability sends all descriptors to the provided channel.
// Every custom collector should over-write this method.
func (bsc *BaseStableCollector) DescribeWithStability(ch chan<- *Desc) {}

// Describe sends all descriptors to the provided channel.
// It intended to be called by prometheus registry.
func (bsc *BaseStableCollector) Describe(ch chan<- *prometheus.Desc) {}

// CollectWithStability sends all metrics to the provided channel.
// Every custom collector should over-write this method.
func (bsc *BaseStableCollector) CollectWithStability(ch chan<- Metric) {}

// Collect is called by the Prometheus registry when collecting metrics.
func (bsc *BaseStableCollector) Collect(ch chan<- prometheus.Metric) {}

func (bsc *BaseStableCollector) add(d *Desc) {}

// Init intends to be called by registry.
func (bsc *BaseStableCollector) init(self StableCollector) {}

func (bsc *BaseStableCollector) trackRegistrableDescriptor(d *Desc) {}

func (bsc *BaseStableCollector) trackHiddenDescriptor(d *Desc) {}

// Create intends to be called by registry.
// Create will return true as long as there is one or more metrics not be hidden.
// Otherwise return false, that means the whole collector will be ignored by registry.
func (bsc *BaseStableCollector) Create(version *semver.Version, self StableCollector) bool {}

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

// HiddenMetrics tells the list of hidden metrics with fqName.
func (bsc *BaseStableCollector) HiddenMetrics() (fqNames []string) {}

var _