Documentation ¶
Overview ¶
Package http implements an http server to export metrics in Prometheus format.
Index ¶
- func New(ctx context.Context, cfg *server.Config, st store.Store, ...) (server.Server, error)
- func ReadMetrics(ctx context.Context, URL string, tlsConfig *tls.Config) (map[string]*dto.MetricFamily, error)
- func WriteMetrics(ctx context.Context, metricFamilies map[string]*dto.MetricFamily, rewrite bool, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New( ctx context.Context, cfg *server.Config, st store.Store, registry *prometheus.Registry, ) (server.Server, error)
New constructs a http server to server the metrics
func ReadMetrics ¶
func ReadMetrics( ctx context.Context, URL string, tlsConfig *tls.Config, ) (map[string]*dto.MetricFamily, error)
ReadMetrics reads the metrics from the endpoint and returns a map of dto.MetricFamily
func WriteMetrics ¶
func WriteMetrics( ctx context.Context, metricFamilies map[string]*dto.MetricFamily, rewrite bool, translators []translator.Translator, out io.Writer, ) error
WriteMetrics writes the metrics, converting HDR Histogram into Log10 linear histograms.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.