Documentation ¶
Overview ¶
Package exporter provides prometheus exporter implementations.
Package exporter provides prometheus exporter implementations.
Index ¶
- func New(metrics []Metric) prometheus.Collector
- func Register(collectors ...prometheus.Collector) error
- func Start(address, urlPath string, listenAndServeFailureFunc func(error)) error
- func Stop(timeout time.Duration) error
- func UnRegister(collectors ...prometheus.Collector) bool
- type Metric
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(metrics []Metric) prometheus.Collector
New is creates a Collector.
ex) collector01 := exporter.New([]exporter.Metric{...})
func Register ¶
func Register(collectors ...prometheus.Collector) error
Register registers the Collectors.
ex) err := exporter.Register(collector01)
func Start ¶
Start is start the server.
ex) err := exporter.Start(":10000", "metrics", func(err error) { klog.ErrorS(err, "") })
func UnRegister ¶
func UnRegister(collectors ...prometheus.Collector) bool
UnRegister unregister the Collectors.
ex) result := exporter.UnRegister(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.