Documentation ¶
Overview ¶
Package exporter provides prometheus exporter implementations.
Package exporter provides prometheus exporter implementations.
Index ¶
- func NewCollector(metrics []Metric) prometheus.Collector
- func RegisterCollector(collectors ...prometheus.Collector) error
- func Start(address, urlPath string, listenAndServeFailureFunc func(error)) error
- func Stop(timeout time.Duration) error
- func UnRegisterCollector(collectors ...prometheus.Collector) bool
- type Metric
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCollector ¶ added in v1.1.9
func NewCollector(metrics []Metric) prometheus.Collector
New is creates a Collector.
ex) collector01 := exporter.NewCollector([]exporter.Metric{...})
func RegisterCollector ¶ added in v1.1.9
func RegisterCollector(collectors ...prometheus.Collector) error
Register registers the Collectors.
ex) err := exporter.RegisterCollector(collector01)
func Start ¶
Start is start the server.
ex) err := exporter.Start(":10000", "metrics", func(err error) { klog.ErrorS(err, "") })
func UnRegisterCollector ¶ added in v1.1.9
func UnRegisterCollector(collectors ...prometheus.Collector) bool
UnRegister unregister the Collectors.
ex) result := exporter.UnRegisterCollector(collector01)
Types ¶
type Metric ¶
type Metric interface { GetDesc() *prometheus.Desc GetValueType() prometheus.ValueType GetValues() []Value }
Metric is an interface that provides the information to be collected.
Click to show internal directories.
Click to hide internal directories.