exporter

package
v1.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchJson

func FetchJson(ctx context.Context, logger log.Logger, endpoint string, config config.Config) ([]byte, error)

func MakeMetricName

func MakeMetricName(parts ...string) string

Types

type JsonMetric

type JsonMetric struct {
	Desc                 *prometheus.Desc
	KeyExtractorPath     string
	ValueExtractorPath   string
	LabelsExtractorPaths []string
	Extractor            extractor.Extractor
}

func CreateMetricsList

func CreateMetricsList(c config.Config) ([]JsonMetric, error)

type JsonMetricCollector

type JsonMetricCollector struct {
	JsonMetrics []JsonMetric
	Data        []byte
	Logger      log.Logger
}

func (JsonMetricCollector) Collect

func (mc JsonMetricCollector) Collect(ch chan<- prometheus.Metric)

func (JsonMetricCollector) Describe

func (mc JsonMetricCollector) Describe(ch chan<- *prometheus.Desc)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL